snarfed / bridgy-fed

πŸŒ‰ A bridge between decentralized social network protocols
https://fed.brid.gy
Creative Commons Zero v1.0 Universal
611 stars 30 forks source link

Quote posts #461

Closed jamietanna closed 3 months ago

jamietanna commented 1 year ago

Quoting a post on Mastodon ends up looking a bit odd (https://indieweb.social/@www.jvt.me@www.jvt.me/110084066464382647) as the original content doesn't get presented - is there something we can do to ie add the link to the post being quoted, rather than trying to embed it?

snarfed commented 1 year ago

Hmm, interesting question!

Afaik Mastodon deliberately has no native quote feature, by design. Background in eg https://github.com/mastodon/mastodon/issues/20673, among others. We could try to construct it ourselves, manually, with text and minimal HTML inside content, but I'm always reluctant to do that kind of thing.

I wonder how other fediverse software supports quoting, if at all, that might be a good place to start.

BF currently converts mf2 quotation-of to AS2 attachment. Here's the log for this post. Mastodon's AP docs say attachment is for media, and don't say anything about quotes, nor do the AS2 core or vocab specs.

snarfed commented 1 year ago

Sounds like the semi-standard way to do AP quotes is FEP-e232 (https://codeberg.org/fediverse/fep/issues/14, https://socialhub.activitypub.rocks/t/announce-activity/3129/4 ). Looks like it's a Note with a Link tag and content in content, eg:


{
    "type": "Note",
    "content": "This is a quote:<br>RE: https://example.com/objects/123",
    "tag": [
        {
            "type": "Link",
            "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
            "href": "https://example.com/objects/123",
            "name": "RE: https://example.com/objects/123"
        }
    ]
}

I assume the RE: https://example.com/objects/123 part of the content is optional.

trwnh commented 1 year ago

the RE: <url> is the part that gets replaced by tag[0]. basically name is the microsyntax. if you wanted to have explicit affordance for "quote tweet" style semantics, you can use rel.

for example, foundkey does this: https://akkoma.dev/FoundKeyGang/FoundKey/pulls/318 and expects at least one of the following rels:

basically, at some point these three uris were used as JSON-LD properties for the same thing.

snarfed commented 1 year ago

Oh wow interesting, microsyntax. Whee, and ugh. Thank you!

snarfed commented 10 months ago

This is officially on Mastodon's roadmap: https://github.com/mastodon/mastodon/issues/309, https://joinmastodon.org/roadmap

jamietanna commented 6 months ago

Quotes are coming in Mastodon 4.4 - https://oisaur.com/@renchap/112299860209222424

temtemy commented 5 months ago

The URL to the quoted post does get included when it comes to Misskey quote posts, though for some reason the URL is not a link. And they should be shown as quote posts in Bluesky anyway because it natively supports it.

Example: https://bsky.app/profile/mima.makai.chaotic.ninja.ap.brid.gy/post/3krmzapfowqg2 Original Misskey post: https://makai.chaotic.ninja/notes/9sv2d3tpar

qazmlp commented 5 months ago

This seems to be because Misskey doesn't attach a "Link" "tag" for the quote URL. Which also explains why some clients fail to open these quoted posts natively, in my experience.

(Bridgy probably shouldn't require a "tag" for turning an <a> into a link in general, only for rewriting the href to a bridged one where available.)

Misskey instead attaches the quote URL under the canoncial IRI "https://misskey-hub.net/ns#_misskey_quote" directly to the post to enable quote presentation, which is documented here: https://misskey-hub.net/ns/

(I wouldn't use "https://www.w3.org/ns/activitystreams#quoteUrl". That appears to be not canonical and potentially collision-prone with future protocol updates.)

temtemy commented 5 months ago

Btw quote posts from Bluesky to AP also seem to fail, I don't see any indication of a quote whether it's Mastodon or Misskey.

Mastodon example: https://yamabi.co/@makai.chaotic.ninja@bsky.brid.gy/112278586683792932 Misskey example: https://makai.chaotic.ninja/notes/9s5ccwqg2f Original Bluesky quote post: https://bsky.app/profile/did:plc:cu33jkvtkoxyfd45wg7hrhra/post/3kq7qpwkces2q

AtiusAmy commented 5 months ago

I feel like Misskey quotes support would be nice as Threads added that as well!

snarfed commented 5 months ago

Note to myself: Bluesky quote post app.bsky.embed.records aren't yet implemented in granary's bluesky.py. Need to do that first here. Would be a good starter project for anyone else interested in contributing!

wakest commented 5 months ago

This seems like it should get some priority cause how you have it now the feeds with people who are Quote posting a lot totally don't make any sense cause you don't have ANY indication of that they are talking about something else. No need to wait for mastodon to do anything, just include the url of the post they QP about

npdoty commented 4 months ago

This would be a huge help for those of us following bridged Bluesky accounts from the fediverse. As it is, many posts simply don't make any sense.

Some Mastodon clients are already handling some version of quoting, even if it's not a part of the core Mastodon software, just by having a URL, and then doing link preview rendering. It's definitely effective, and would make the bridged messages a lot less confusing.

AtiusAmy commented 4 months ago

We could also do something like Threads. Threads will have a link to the quote post, but if you're on a software with quote post (for ex: Misskey) it will show as quotes. On software that dont like Mastodon will show as link and if someone quote post a post from someone who is not bridged it will also be a link no matter what software you're on.

English is not my first language, so i must apologize if my point seem not concise

(PS: I also kinda want quote post bridging from AP -> Bsky, I'm from Misskey (one of the many software that supports it) and it looks weird on bsky)

Screenshot_20240615-044947_Firefox.png

Screenshot_20240615-045049_Aria.png

snarfed commented 4 months ago

Progress. Here's how Bluesky quote posts now look in Mastodon (https://bsky.app/profile/snarfed.bsky.social/post/3kv6hsw44wk2q => https://indieweb.social/@snarfed.bsky.social@bsky.brid.gy/112636479451138698 ):

image
snarfed commented 4 months ago

I'm still looking for a Misskey instance I can create an account on to test this. I've looked at https://misskey.io/ and https://quietplace.xyz/ , and neither of them can see @bsky.brid.gy@bsky.brid.gy, so I can't enable the bridge on them. makai.chaotic.ninja, which @temtemy mentioned above, doesn't have open signups.

@AtiusAmy, any thoughts on where I can test this?

nanikamado commented 4 months ago

Here is the link for @bsky.brid.gy@bsky.brid on misskey.io: https://misskey.io/@bsky.brid.gy@bsky.brid.gy

snarfed commented 4 months ago

Ah, thank you! And on quietplace.xyz : https://quietplace.xyz/@bsky.brid.gy@bsky.brid.gy

Any idea why it doesn't show up in user search on those instances? Or on eg the users tab of https://quietplace.xyz/instance-info/bsky.brid.gy ?

snarfed commented 4 months ago

Useful thoughts from @qazmlp in https://github.com/snarfed/granary/commit/3fc6eb98f28b42f362e0a671d5a4a91d1504676d#commitcomment-143259713 :

Since posts can be edited, the pointed to post may change from the state it was quoted in. Bluesky appears to have laid some groundwork to detect this (I assume to display a notice in such cases, once editing lands and content can diverge).

Fediverse instances (unfortunately) don't do this, and it was only mentioned once in FED-e232: Object Links. The proposal linked there was also closed, so I'm just going to assume it's both not planned and, if it was, would look a bit more complex than what Bluesky is doing 🀷

The alternative is to detect and notify users when a post they've quoted changes, but that's neither reliable in a federated system nor would it work for quoters who don't use social media enough to react. Oh well. Someone might eventually go ahead and do it if it becomes a serious-enough problem.

It seems like current inbox delivery could easily be extended to send Updates for a given post to all authors of known quote posts of that post, which could help with this. I don't know if any fediverse projects currently do that, though. I'm guessing no.

hybridhavoc commented 4 months ago

I've noticed this change today but not sure if something is maybe going wrong on the Mastodon side. This post (https://darkfriend.social/@mmasnick.bsky.social@bsky.brid.gy/112638756668109759) includes a link (https://bsky.brid.gy/convert/ap/at://did:plc:dhkmbru2x57gpmzwufafq6ef/app.bsky.feed.post/3kv7nbofcnp2x) that seems like it should be to the quoted post (https://bsky.app/profile/dannagal.bsky.social/post/3kv7nbofcnp2x) but if it's meant to do a redirect that's just not firing, and instead I'm left looking at some JSON.

snarfed commented 4 months ago

Thanks for the nudge! You're right, that's not great, and not Mastodon's fault. I'll work on that.

trwnh commented 4 months ago

It seems like current inbox delivery audience targeting could easily be extended to send post Updates to all known quote post authors, which could help with this.

This isn't really something that works unless you have an explicit idea of a "quote post". Right now (and under e232), it's just a normal link like any other. Having the linked resource change is not special, and adding a notification mechanism for when any linked resource changes is pretty firmly out-of-scope. This is the kind of thing that would be more likely to be possible if there was an actual special collection of "quote posts", which there currently is not (and I'm not sure there should be one, either -- merely linking to a resource is not something that should be special imo).

On Tue, Jun 18, 2024, 12:17 Ryan Barrett @.***> wrote:

Useful thoughts from @qazmlp https://github.com/qazmlp in @.***#commitcomment-143259713 https://github.com/snarfed/granary/commit/3fc6eb98f28b42f362e0a671d5a4a91d1504676d#commitcomment-143259713 :

Since posts can be edited, the pointed to post may change from the state it was quoted in. Bluesky appears to have laid some groundwork to detect this (I assume to display a notice in such cases, once editing lands and content can diverge).

Fediverse instances (unfortunately) don't do this, and it was only mentioned once in FED-e232: Object Links. The proposal linked there was also closed, so I'm just going to assume it's both not planned and, if it was, would look a bit more complex than what Bluesky is doing 🀷

The alternative is to detect and notify users when a post they've quoted changes, but that's neither reliable in a federated system nor would it work for quoters who don't use social media enough to react. Oh well. Someone might eventually go ahead and do it if it becomes a serious-enough problem.

It seems like current inbox delivery audience targeting could easily be extended to send post Updates to all known quote post authors, which could help with this. I don't know if any fediverse projects currently do that, though. I'm guessing now.

β€” Reply to this email directly, view it on GitHub https://github.com/snarfed/bridgy-fed/issues/461#issuecomment-2176599660, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQ5OX63CGV4TF2OJTFODPTZIBTSFAVCNFSM6AAAAAAWHSJFIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGU4TSNRWGA . You are receiving this because you commented.Message ID: @.***>

snarfed commented 4 months ago

Hi @trwnh! Sure, of course. We're squarely in e232-land here, and even then, you're right that there isn't necessarily a definition of a "quote post," even as a subset of linked resources.

I'm not seriously proposing or working on anything like update notifications for quote posts, it was just a casual hypothetical. If I was, a first pass could be:

I'm sure this has problems, but it's at least a straw man. I don't plan to take it farther than this though. 😁

AtiusAmy commented 4 months ago

I'm still looking for a Misskey instance I can create an account on to test this. I've looked at https://misskey.io/ and https://quietplace.xyz/ , and neither of them can see @bsky.brid.gy@bsky.brid.gy, so I can't enable the bridge on them. makai.chaotic.ninja, which @temtemy mentioned above, doesn't have open signups.

@AtiusAmy, any thoughts on where I can test this?

Misskey.art might work

https://misskey.art/@bsky.brid.gy@bsky.brid.gy

AtiusAmy commented 4 months ago

Screenshot_20240619-082505_Firefox.png

πŸŽŠπŸŽ‰

snarfed commented 4 months ago

Woo, awesome! Thank you for testing!

AtiusAmy commented 4 months ago

Screenshot_20240619-083416_Aria.png

Viewed on Sharkey/Misskey :D

snarfed commented 4 months ago

Yes! I confirmed on Misskey just now too, https://quietplace.xyz/notes/9unjb8tho85n1rid

image

I expected Misskey to remove the RE: [URL] suffix, but oh well.

AtiusAmy commented 4 months ago

Yes! I confirmed on Misskey just now too, https://quietplace.xyz/notes/9unjb8tho85n1rid

image

I expected Misskey to remove the RE: [URL] suffix, but oh well.

Akkoma and Threads look just like this on Misskey as well, so it should be fine

snarfed commented 4 months ago

OK, @hybridhavoc https://github.com/snarfed/bridgy-fed/issues/461#issuecomment-2176620836 should be fixed by ^ snarfed/granary@992e5b5, the RE: ... links should now work right in browsers.

Aaand I think that's it! Quote posts should now translate natively, both directions, if the quoted post's author has enabled the bridge. Otherwise, the post text will end with RE: ... with a link to the quoted post.

Phew, that took some work. Tentatively closing!

dploeger commented 4 months ago

Hmmm. This looks kinda weird now:

https://fed.brid.gy/r/https://bsky.app/profile/did:plc:vzeclfzjqfezzecw543cafaq/post/3kvc5vutiol2v

That link in there is some tech data about the original post I think.

snarfed commented 4 months ago

@dploeger Do you mean the "RE: ..." at the end of the post text, like the screenshot below? Are you looking at it in Mastodon? Sadly Mastodon doesn't support quote posts yet. They say they're working on it!

(Quote posts are awkward and not widely supported in the fediverse in general, and even where they are supported and render the quoted post inline, they often also still include this RE: ... suffix. 🀷)

image

dploeger commented 4 months ago

I'm seeing it on IceCubes and that renders links to other Mastodon posts inline for quotes.

However, if they don't I would've expected the link after Re: to send me to the original Bluesky post, but that link only leads to some sort of JSON representation.

snarfed commented 4 months ago

Interesting! I expect IceCubes is using the Mastodon API to do that, which won't work with Bridgy Fed since it isn't Mastodon.

You're absolutely right that the link should work though! I thought I fixed that yesterday in https://github.com/snarfed/bridgy-fed/issues/461#issuecomment-2177434432 , but evidently that fix isn't always working. I'll look.

dploeger commented 4 months ago

Thanks a lot for your work!

hybridhavoc commented 4 months ago

That's interesting because the link posted above (https://fed.brid.gy/r/https://bsky.app/profile/did:plc:vzeclfzjqfezzecw543cafaq/post/3kvc5vutiol2v) works for me, sends me to the Bluesky post. But I've seen some other bridged Bluesky posts today (like this one https://darkfriend.social/@mmasnick.bsky.social@bsky.brid.gy/112644015357113938) that still just have the link to the JSON.

image

My instance is Mastodon version 4.2.9. The quoted post is probably not itself bridged, so I don't know if that's actually the problem - that it's meant to display differently if it is bridged. If there is intended to be an embed, so far as I can tell that embed never appears for me.

dploeger commented 4 months ago

@hybridhavoc yes it does. I'm sorry. I thought it would lead to a Mastodon website for it, but bridgy (intelligently) directly forwards to BlueSky. What I originally meant was the link INSIDE that post, after the RE (see the screenshot above)

snarfed commented 4 months ago

@hybridhavoc Mastodon doesn't support quote posts yet, so they won't show embeds at all. But you're also right that quoted posts that aren't bridged won't show as embeds even on platforms that do support them.

I think I've fixed the RE: links now. Example: https://bsky.app/profile/snarfed.bsky.social/post/3kvcdqj4vik2f => https://indieweb.social/@snarfed.bsky.social@bsky.brid.gy/112644716938090636 , screenshot below. Please post here again if you see any new bridged quote posts created after ~11:30a PT today that still have the old bad links!

image

mackuba commented 4 months ago

Ooh, I was just going to ask if they could include the bsky.app URL instead of the ugly /convert/at:// thing, let me test this…

mackuba commented 4 months ago

Yup, looking good, thanks @snarfed! πŸ‘

Screen Shot 2024-06-19 at 20 51 04
snarfed commented 4 months ago

Oh wow, nice, the link preview turns it into a hacky approximation of a quote post anyway, even on Mastodon. Love it.

AtiusAmy commented 4 months ago

https://bsky.app/profile/AmyIsCoolz.social.atiusamy.com.ap.brid.gy/post/3kvcmqcpywtt2

Does quote post not work with images on bsky or it can't fetch that specific post of mine (which was bridged afaik)

AtiusAmy commented 4 months ago

AP->AT huh, when I quote post myself (without images) it does not seem to be bridged at all, I'll try again in a sec

AtiusAmy commented 4 months ago

Phew Not sure if I should create a new issue, but I narrowed down the problem!

You can see the difference in bridged post here:

https://social.atiusamy.com/@atiusamy

https://bsky.app/profile/atiusamy.social.atiusamy.com.ap.brid.gy

  1. If I quote post a Bluesky user, it is bridged
  2. If I quote post a Fediverse user (that is bridged) it will not be be bridged, however if I send an image in the quote post, it will be bridged just not the quote post.
snarfed commented 4 months ago

Thanks for the investigation @AtiusAmy! Will look.

dploeger commented 4 months ago

I can confirm that it works perfectly now. Thanks a lot for all your work, people! β™₯️

AtiusAmy commented 4 months ago

Thanks for the investigation @AtiusAmy! Will look.

Ok I found out something image image

The amount of post is the same on bsky and AP, despite having less post on the BSKY side (You can count). Not sure what's going on, maybe it is bridged but the appview won't render?

jamietanna commented 4 months ago

Noticed that my first quote hasn't rendered properly - maybe my MF2 markup?

Post: https://fed.brid.gy/r/https://www.jvt.me/mf2/2024/06/o0vwu/

Screenshot_20240622-225708

Or is this expected?

AtiusAmy commented 4 months ago

image Probably expected? Misskey supports native quote posting and they doesn't seem to show anything (aside from the weird unknown thing).

snarfed commented 4 months ago

Interesting! We haven't really tested web => AP quote posting yet; we clearly need to. @jamietanna I think your mf2 here is probably fine, the (initial) problem here is that BF interpreted it as an article quote, which doesn't trigger the rest of its quote post pipeline. Clearly wrong, the quoted URL is an AP note, so we can do better.

This issue is pretty long and hairy, I'll create a new one.