Append attachments to comments by flamingo-cant-draw ?? Pull Request #5143 ?? LemmyNet/lemmy

  • Aatube@kbin.melroy.orgOP
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    This PR doesn’t add that, but anecdotally I’m fairly sure it already works for Mastodon… Not a Mastodon user, so I can’t find any examples though. They definitely show on Mbin tho.

    • Andrew@piefed.social
      link
      fedilink
      English
      arrow-up
      8
      ·
      edit-2
      2 months ago

      I just tried with Masto - maybe there’s different versions, but it didn’t work with the one I tried.

      Screenshot:

      It’s probably for the best that this PR doesn’t also convert inline Markdown into an attachment to send out for Mastodon’s benefit, because then there would be the danger of apps that understand both showing two images. It’d be better if Mastodon did the translation when receiving stuff, but Mastodon doesn’t seem as good as MBIN when it comes to co-operating with Lemmy.

      (edit: how that screenshot shows on MBIN is a bit disappointing though - at least looking at on the web)

        • Andrew@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 months ago

          How does Piefed handle image attachments, btw?

          For comments: not at all. If a Mastodon user tried to do what I did, with the inline image, nothing would show.

          We could do what I think you’ve done, and regex the details of the attachment into ! [] () Markdown and add it to the text. There’s also a DB relationship between comments and images that isn’t used, but could be, I suppose.

          I’ve never actually seen a Mastodon user try to add an image to something that ended up as a Lemmy comment, tbh, so it’s not something I’ve thought too much about.

          • flamingos-cant@feddit.uk
            link
            fedilink
            English
            arrow-up
            4
            ·
            edit-2
            2 months ago

            We could do what I think you’ve done, and regex the details of the attachment into ! [] ()

            To be clear, this pull request doesn’t use regex, it’s just JSON deserialisation and string interpolation.

            I’ve never actually seen a Mastodon user try to add an image to something that ended up as a Lemmy comment, tbh, so it’s not something I’ve thought too much about.

            The pull request actually includes one, the main KDE account tags [email protected] and includes pictures in their threads regularly. It’s just hard to tell from our side as you can’t see what’s missing.

            • Andrew@piefed.social
              link
              fedilink
              English
              arrow-up
              4
              ·
              1 month ago

              Ah, great, thank you. It’s been added as an Issue for PF now, with a link to this post, so that’ll be handy.

              (I was likely misusing the term ‘regex’).