Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long posts from ActivityPub that contain images end up truncated without link #1106

Closed
lupomancer opened this issue Jun 3, 2024 · 9 comments
Labels

Comments

@lupomancer
Copy link

Long posts usually get truncated with a link to the original post on the fediverse like so

https://bsky.app/profile/lupomancer.furries.club.ap.brid.gy/post/3ktr4vwupiba2

but when a long post contains images, it ends up just truncating the post without linking to the original like the following:

https://bsky.app/profile/lupomancer.furries.club.ap.brid.gy/post/3ku2a3mdgr6o2

@lupomancer lupomancer changed the title Long posts from ActivityPub that contain images end up truncated Long posts from ActivityPub that contain images end up truncated without link Jun 3, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 3, 2024

Ooh, good catch! Thank you for filing. I think I know what's happening here, should be a straightforward fix.

@snarfed snarfed added the now label Jun 10, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 11, 2024

So the fix here is straightforward, but not ideal. Bluesky posts can have either a link embed or images, but not both. So if I "fix" this, these posts would get the link card to the original post, but lose the attached images. Hrm.

One alternative would be to link to the original post in the post text instead of an embed, so we could keep the images. That would be inconsistent with using the embed in truncated posts without images, but that may be ok.

@snarfed
Copy link
Owner

snarfed commented Jun 11, 2024

Filed bluesky-social/atproto#2575 for this ^

snarfed added a commit to snarfed/granary that referenced this issue Jun 11, 2024
...instead of in an external embed, since Bluesky doesn't support both image and external embeds in the same post:
bluesky-social/atproto#2575
snarfed/bridgy-fed#1106
snarfed/bridgy-fed#1078
@snarfed
Copy link
Owner

snarfed commented Jun 11, 2024

Phew, this was more complicated than I expected. No matter, should be working now!

@mackuba
Copy link

mackuba commented Jun 13, 2024

It looks like the facet positions aren't calculated correctly in some cases, e.g.:

https://bsky.app/profile/aboveedxw.mastodon.social.ap.brid.gy/post/3kusqralvfqe2
https://bsky.app/profile/baoteca.mastodon.social.ap.brid.gy/post/3kurc4rv3dte2

Yeah I know this API is tricky to use :)

@snarfed snarfed reopened this Jun 13, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 13, 2024

Ugh, thanks for reporting. Reopening.

Agreed, index-based rich text APIs like this tend to be easier and safer for the rendering side (eg bsky.app) than inline markup like HTML, but they're definitely more difficult and error prone for publishers, and there are generally way more publishing implementations than rendering implementations. Afaik publishing standards communities (PDF, PostScript, DOCX, etc) have largely converged on inline markup for those reasons. 🤷‍♂️

snarfed added a commit to snarfed/granary that referenced this issue Jun 13, 2024
@snarfed
Copy link
Owner

snarfed commented Jun 13, 2024

^ Should be fixed now. Thanks again for the report @mackuba!

@snarfed snarfed closed this as completed Jun 13, 2024
@mackuba
Copy link

mackuba commented Jun 13, 2024

Btw, Skythread now reads the bridgyOriginalText property and shows the full text automatically: https://blue.mackuba.eu/skythread/?author=MilekPl.sciences.social.ap.brid.gy&post=3kuscj3txuue2

@snarfed
Copy link
Owner

snarfed commented Jun 13, 2024

Awesome! Love it. bridgyOriginalUrl next! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants