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

Quote reposts #29

Open
aumetra opened this issue Dec 16, 2022 · 2 comments
Open

Quote reposts #29

aumetra opened this issue Dec 16, 2022 · 2 comments

Comments

@aumetra
Copy link
Member

aumetra commented Dec 16, 2022

Reposts work via an announce activity and activities are just extended objects, so they can have content

Idea: Add content to the announce activity, if there's no content, it's a normal repost. If there is content it's a quote repost

@tesaguri
Copy link
Contributor

tesaguri commented Oct 17, 2023

There are a lot of prior arts like it's an incarnation of xkcd #927 (Standards), but it seems that the major ones are attaching to quoting Notes the reference to the quoted post, instead of making the quotes Announces.

The advantage of the Note representation over Announce one is that servers without explicit support for quote posts can still view a quote post as an ordinary post with a hyperlink to the quoted post. Also, a quote post can naturally be a reply at the same time this way.

Here is an example of a quote post as implemented by a Mastodon fork named Fedibird (with irrelevant properties being omitted):

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "fedibird": "http://fedibird.com/ns#",
      "quoteUri": "fedibird:quoteUri",
      "misskey": "https://misskey-hub.net/ns#",
      "_misskey_quote": "misskey:_misskey_quote",
      "_misskey_content": "misskey:_misskey_content"
    }
  ],
  "id": "https://fedibird.com/users/tesaguri/statuses/111232525207963963",
  "type": "Note",
  "inReplyTo": "https://fedibird.com/users/tesaguri/statuses/111216220657062989",
  "quoteUri": "https://fedibird.com/users/tesaguri/statuses/111170983338974805",
  "_misskey_quote": "https://fedibird.com/users/tesaguri/statuses/111170983338974805",
  "_misskey_content": "https://codeberg.org/tesaguri/fep/src/branch/fep-1ee6/fep/1ee6/fep-1ee6.md\n改名した",
  "content": "<p><a href=\"https://codeberg.org/tesaguri/fep/src/branch/fep-1ee6/fep/1ee6/fep-1ee6.md\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">codeberg.org/tesaguri/fep/src/</span><span class=\"invisible\">branch/fep-1ee6/fep/1ee6/fep-1ee6.md</span></a><br />改名した<span class=\"quote-inline\"><br/>QT: <a class=\"status-url-link\" data-status-account-acct=\"tesaguri\" data-status-id=\"111170983338974805\" href=\"https://fedibird.com/@tesaguri/111170983338974805\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">fedibird.com/@tesaguri/1111709</span><span class=\"invisible\">83338974805</span></a></span><span class=\"reference-link-inline\"> <a href=\"https://fedibird.com/@tesaguri/111232525207963963/references\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"status-link unhandled-link\" data-status-id=\"111232525207963963\">[参照]</a></span></p>"
}

This post is quoting another post https://fedibird.com/users/tesaguri/statuses/111170983338974805, which is denoted by the _misskey_quote and quoteUri properties. A link to the quoted post is embedded into the content property with the microsyntax <span class="quote-inline"><br/>QT: <a …>…</a></span>, so that servers which don't understand the extension properties still recognize the quoted post as a plain hyperlink. And compatible servers will replace the microsyntax with a proper quote UI, as you can see in the HTML representation of the post.

The example contains multiple properties (_misskey_quote and quoteUri) with the same semantics, due to the xkcd-927 situation.

Prior arts

Misskey

Misskey defines the https://misskey-hub.net/ns#_misskey_quote property. For backwards compatibility, it also supports as:quoteUrl (both incoming and outgoing), a non-standard extension (despite of its use of the as: namespace) originally introduced by a Mastodon fork at wakin-/mastodon#39 (cf. misskey-dev/misskey#5632).

Fedibird

Fedibird has implemented the quote feature based on the Mastodon fork wakin-/mastodon#39 that introduced the as:quoteUrl extension (fedibird/mastodon@27da15b), and also added support for the _misskey_quote property. But it accidentally began using as:quoteURL instead of as:quoteUrl due to a bug (fedibird/mastodon#9), and "fixed" the bug by replacing the property with a newly introduced http://fedibird.com/ns#quoteUri property (fedibird/mastodon@8f03e35). Note that the new property is named quoteUri, not quoteUrl.

In consequence, it now uses the _misskey_quote and quoteUri properties (both incoming and outgoing).

Akkoma

Akkoma seems to support quoteUrl, quoteURL, quoteUri and _misskey_quote for incoming posts and use fedibird:quoteUri for outgoing posts (I'm not sure though) (https://akkoma.dev/AkkomaGang/akkoma/pulls/113).

Glitch+Treehouse Edition

Treehouse seems to support quoteUrl, quoteUri and _misskey_quote for incoming posts and use fedibird:quoteUri for outgoing posts (https://gitea.treehouse.systems/treehouse/mastodon/pulls/36).

FEP-e232 and attachment

FEP-e232 (Object Links) formalizes a quote posts as a Link with mediaType of application/ld+json; profile="https://www.w3.org/ns/activitystreams" in the tag property, rather than inventing an extension property.

I think the design is consistent with other Activity Streams constructs while being quite extensible as well (it can be applied to other kind of links in addition to quotes as shown by the example in the proposal, and also it's trivially generalizable to quotes from multiple posts).

Also, there seems to have been an implementation that added Links to quoted posts to the attachment property instead of tag, as shown in misskey-dev/misskey#8722 (comment), but the link in the comment is now unreachable and I couldn't figure out the details.

There was a PR for Misskey to implement the FEP (misskey-dev/misskey#8837), but an active contributor was mildly against it at best (misskey-dev/misskey#8837 (comment)), and the PR was closed due to a lack of spare time/motivation of the author.

Mastodon?

Previously, Mastodon had been reluctant to support a quote posts feature, as mentioned in their official blog article, but later, they've added the quote posts feature to their roadmap (MAS-48 Quote posts), so the likelihood is that they will someday implement the feature.

So, how will they implement the feature, exactly? Well, there are a number of feature request issues for it with hundreds of comments, but there doesn't seem to be a canonical tracking issue yet, so their plan is anyone's guess.

But at least, it seems that Gargron isn't a fan of having ad-hoc extension properties (mastodon/mastodon#18473 (comment)). And they even suggest that using the Announce activity instead, which doesn't bode well xkcd-927-wise.

What should we do, then?

It seems that the major implementations support at least the _misskey_quote property for incoming posts, so implementing it for outgoing posts may be sufficient for the time being. But the situation is still in flux, especially in light of Mastodon's ongoing plan (or lack thereof).

For maximum compatibility, we might want to implement all the three extension properties (quoteUrl, quoteUri and _misskey_quote) and FEP-e232 (or some of them). If/when Mastodon implements the feature, it is expected that the other implementations will follow suit, and hopefully we would be able to phase out the compatibility properties then.

@silverpill
Copy link

Pleroma now supports quote posts as well: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3921/diffs (unreleased).
They use quoteUrl as the default representation (for outgoing posts), but accept FEP-e232 links and other possible representations like quoteUri.

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

No branches or pull requests

3 participants