-
Notifications
You must be signed in to change notification settings - Fork 34
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
AP: try marking up @-mentions in content with semantic HTML #887
Comments
Got nudged on this again recently: #1009 (comment) |
[I removed my earlier comment, that was mistaken.] Ah, actually I think it finds them by CSS class, here: https://github.com/mastodon/mastodon/blob/b06fd54c305915527e3a6edc575dc23b623143ef/app/javascript/hooks/useLinks.ts#L8-L9C31. So most likely, you just need to put |
😂 😭 Thanks for the sleuthing! |
Sadly curl -vL -H 'Accept: application/activity+json' https://bsky.brid.gy/r/https://bsky.app/profile/did:plc:3ljmtyyjqcjee2kpewgsifvb/post/3lacg74pbtb24 eg https://indieweb.social/@snarfed.bsky.social@bsky.brid.gy/113437538777283822 , or if you're not logged into indieweb.social, search for @snarfed.bsky.social@bsky.brid.gy, it's their first post: |
It's close though, it now fails this condition somehow: https://github.com/mastodon/mastodon/blob/d482211aa6293f78f161cbc7149e829966cd8e3a/app/javascript/mastodon/components/status_content.jsx#L108 I had to look this up by searching for
… Ohhhhhhh. It matches the link's href on the account's (web) That actually makes complete sense, since the post body link is user-facing and should point to an HTML page. |
Regarding my earlier comment #887 (comment): Turns out the function that detects I think this is different because the lookup is lazy there, because Mastodon doesn't want to eagerly fetch a potentially unbounded network of users that bio-mention each other. Accounts |
Phew. Fediverse hashtags and mentions, ugh, feels like they never end. OK! So the next thing to try here is:
Thanks @Tamschi! BF isn't set up to do this easily right now, not sure how I'd try. Maybe here, load all the mentioned actors, replace their Line 856 in fe16b19
|
I looked at Granary yesterday to see if I could contribute this directly, but yeah in Python this is beyond me unless the data is right there already. Some ActivityPub software also accepts the web URL in the |
Mastodon understands which links in a given post are @-mentions and rewrites them to point to the local instance. Example: https://ohai.social/@lutoma/111947244364291173 . The first reply there from me is via Bridgy Fed, which has @-mention links that don't get that rewriting.
The only differences I see between the two posts' AS2 is that Mastodon's
tag.name
s are fuly qualified, eg@mmu_man@m.g3l.org
, while BF's are only@mmu_man
, and that Mastodon'sa
tags in content haveclass="u-url mention"
. Not sure which matters, or both, or something else:Mastodon AS2 object:
BF AS2 object:
The text was updated successfully, but these errors were encountered: