lemmy
lemmy copied to clipboard
[Bug]: Threads having a link and image attachment show only the image
Requirements
- [x] Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
- [x] Did you check to see if this issue already exists?
- [x] Is this only a single bug? Do not put multiple bugs in one issue.
- [x] Do you agree to follow the rules in our Code of Conduct?
- [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
Summary
Activities of posts might have both an image and a URL (to a website, not to an image) attached to it. In such a case Lemmy will just show the image, the URL is not returned by the post API.
Steps to Reproduce
- create an activity for thread-like posts which has an image and a link as attachments -> example post
- the remote post will not show the link -> example post on Lemmy
Technical Details
The contents of the activity can be seen here.
Version
BE 0.19.13
Lemmy Instance URL
https://sh.itjust.works
At the moment we only take the first attachment for a post. The solution would be to add links for any remaining attachments to the end of the post body. We already do this for comments. Contributions welcome!
- https://github.com/LemmyNet/lemmy/blob/9d98c82ec30e8f261fd9459a4e75dc0f979de0eb/crates/apub/objects/src/objects/post.rs#L250
- https://github.com/LemmyNet/lemmy/blob/9d98c82ec30e8f261fd9459a4e75dc0f979de0eb/crates/apub/objects/src/utils/functions.rs#L261