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

Bluesky => fediverse: some @-mention hrefs not converted #1607

Open
snarfed opened this issue Dec 6, 2024 · 6 comments
Open

Bluesky => fediverse: some @-mention hrefs not converted #1607

snarfed opened this issue Dec 6, 2024 · 6 comments
Labels
bug User-facing breakage and reliability issues within Bridgy Fed.

Comments

@snarfed
Copy link
Owner

snarfed commented Dec 6, 2024

Odd, we should be wrapping Bluesky @-mention tag.hrefs in our own URLs that convert them to AS2, but at least sometimes we're not. Example: https://bsky.brid.gy/convert/ap/at://did:plc:phxtnvotfvp6322ew3rlrvyl/app.bsky.feed.post/3lclqo2v5a225 , visible on https://www.threads.net/fediverse_profile/[email protected] , note the second tag has href: https://bsky.app/profile/snarfed.org:

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {"_misskey_quote": "https://misskey-hub.net/ns#_misskey_quote"}
  ],
  "type": "Note",
  "id": "https://bsky.brid.gy/convert/ap/at://did:plc:phxtnvotfvp6322ew3rlrvyl/app.bsky.feed.post/3lclqo2v5a225",
  "url": "https://bsky.brid.gy/r/https://bsky.app/profile/did:plc:phxtnvotfvp6322ew3rlrvyl/post/3lclqo2v5a225",
  "_misskey_quote": "https://threads.net/ap/users/17841400539003309/post/18044832881277913/",
  "attributedTo": "https://bsky.brid.gy/ap/did:plc:phxtnvotfvp6322ew3rlrvyl",
  "content": "<p>OMG OMG OMG we're able to bridge our threads accounts into Blue sky via federation <a class=\"mention\" href=\"https://ap.brid.gy/ap.brid.gy\">@ap.brid.gy</a>  & <a class=\"mention\" href=\"https://bsky.app/profile/snarfed.org\">@snarfed.org</a><br><br>RE: <a href=\"https://bsky.app/profile/did:plc:4ghwklnin2mvmam4ditdwv2o/post/3lclod7ptodd2\">https://bsky.app/profile/did:plc:4ghwklnin2mvmam4ditdwv2o/post/3lclod7ptodd2</a></p>",
  "contentMap": {
    "en": "OMG OMG OMG we're able to bridge our threads accounts into Blue sky via federation @ap.brid.gy  & @snarfed.org"
  },
  "published": "2024-12-05T22:45:35.222Z",
  "quoteUrl": "https://threads.net/ap/users/17841400539003309/post/18044832881277913/",
  "tag": [
    {
      "href": "https://ap.brid.gy/ap.brid.gy",
      "name": "@ap.brid.gy",
      "type": "Mention"
    },
    {
      "href": "https://bsky.app/profile/snarfed.org",
      "name": "@snarfed.org",
      "type": "Mention"
    },
    {
      "href": "https://threads.net/ap/users/17841400539003309/post/18044832881277913/",
      "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
      "name": "RE: https://bsky.app/profile/did:plc:4ghwklnin2mvmam4ditdwv2o/post/3lclod7ptodd2",
      "type": "Link"
    }
  ],
  "to": ["https://www.w3.org/ns/activitystreams#Public"],
  "cc": ["https://bsky.app/profile/snarfed.org"],
}
@snarfed snarfed added now bug User-facing breakage and reliability issues within Bridgy Fed. labels Dec 6, 2024
@Tamschi
Copy link
Collaborator

Tamschi commented Dec 6, 2024

The contentMap should contain HTML too, that's another bug.

I'll have to check whether Mastodon prefers content and if that breaks auto-translate.

@snarfed
Copy link
Owner Author

snarfed commented Dec 6, 2024

Last I checked Mastodon was happy with this and allowed auto-translate on it.

@Tamschi
Copy link
Collaborator

Tamschi commented Dec 6, 2024

Yes, the answers are 'Yes' and 'No.' respectively:

Which has some edge cases where it would definitely break down, but it's the safest option while they have no actual multi-language support.

I'll still file a bug because Bridgy Fed's behaviour here would break anything that does have proper post internationalisation.

@Tamschi
Copy link
Collaborator

Tamschi commented Dec 6, 2024

There's an invalid comma in the second-to-last line above.

What's quoteUrl? It's missing from the contexts.

@snarfed
Copy link
Owner Author

snarfed commented Dec 6, 2024

Hah yes, feel free to ignore JSON comma issues in activities and objects I pasted in here, it's from me manually moving around fields a bit to put type, id, etc near the top.

quoteUrl came from Misskey, it was evidently mistakenly attributed to AS2, as https://www.w3.org/ns/activitystreams#quoteUrl , even though it doesn't actually exist there.

#461 (comment)
https://misskey-hub.net/ns#_misskey_quote
misskey-dev/misskey#8722 (comment)

The same question got asked in #461 (comment) back when we launched this.

So good point, you're right that quoteUrl is missing from context. It might exist in some context I could add, but I don't know what.

...having said that, to be honest, I run out of patience pretty quickly for fiddling with @context to make overly-strict JSON-LD consumers happy with unknown fields when both JSON-LD and @context are optional in AP. (I know this is a controversial point.) If some fedi software blows up and chokes on any activity with any field that isn't perfectly specified in @context, I don't have a ton of motivation personally to put a lot of effort into satisfying them. Not claiming that's right of me, just describing where my head is at.

@Tamschi
Copy link
Collaborator

Tamschi commented Dec 6, 2024

Ah right, I remember seeing that aside in their extensions page now, must have forgotten.

It would be nice if they mentioned which other "other ActivityPub programs" require it 😕

@snarfed snarfed removed the now label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug User-facing breakage and reliability issues within Bridgy Fed.
Projects
None yet
Development

No branches or pull requests

2 participants