feat: crossposted replies look like replies (v2.20.0)
- Native replies on the same network: GoToSocial in_reply_to_id (resolved by our instance) with the author's @mention; Bluesky reply root/parent - Replies to our own notes (permalink or any crosspost URL) thread under that note's crosspost on every network, Threads included - Otherwise "↩ Replying to <author>" and the link; on Bluesky the name is the link. compose_text keeps the line whole when shortening Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f7a936562c
commit
67c0411fd8
5 files changed
+467
-20
No files matched your search
@@ -0,0 +1,78 @@
|
||||
# v2.20.0: Crossposted replies look like replies
|
||||
|
||||
## Why
|
||||
|
||||
Crossposting ignored `in_reply_to`. A reply to
|
||||
`https://defcon.social/@deviantollam/117611186265622833` went to GoToSocial
|
||||
and Bluesky as an ordinary post (text, permalink, hashtags), with nothing to
|
||||
say it answered anyone.
|
||||
|
||||
## Behaviour
|
||||
|
||||
For each target, in order:
|
||||
|
||||
| Replying to | GoToSocial | Bluesky | Threads |
|
||||
|---|---|---|---|
|
||||
| One of our notes (its page, or a crosspost of it on any network) | Native reply to that note's GoToSocial status | Native reply to its Bluesky post | Native reply (`reply_to_id`) to its Threads post |
|
||||
| A fediverse post | Native reply (`in_reply_to_id`, resolved by our instance) starting with `@acct` | Reply line | Reply line |
|
||||
| A Bluesky post | Reply line | Native reply (`reply.root`/`reply.parent`) | Reply line |
|
||||
| Anything else | Reply line | Reply line | Reply line |
|
||||
|
||||
The reply line is `↩ Replying to <who>`, where *who* is the reply
|
||||
context's author name, else its title, else the URL's host:
|
||||
|
||||
- GoToSocial and Threads: the line, then the URL, then a blank line and the note.
|
||||
On Threads the URL counts towards Meta's limit of five links, so the
|
||||
body gets one link fewer.
|
||||
- Bluesky: the line without the URL. *Who* is a link facet to the post,
|
||||
which saves up to ~100 of the 300 characters.
|
||||
|
||||
`compose_text(..., lead=...)` keeps the line whole and shortens the body
|
||||
instead when the post is too long.
|
||||
|
||||
### The @mention
|
||||
|
||||
The user chose to start a native fediverse reply with the author's
|
||||
mention, as Mastodon and GoToSocial clients do. Without it the author isn't
|
||||
notified, and their server may never receive the reply, so it wouldn't show
|
||||
in their thread. There's no mention when replying to our own account (the
|
||||
search result's account id equals `verify_credentials`), or when the note
|
||||
already contains the mention.
|
||||
|
||||
### Our own posts
|
||||
|
||||
`_own_note_id(url)` maps a URL to a note: a synced `syndications.remote_url`
|
||||
on any target, or `/note/<slug>` and `/article/<slug>` on this site.
|
||||
`_reply_fields` then takes that note's `remote_id` on the target being
|
||||
posted to, as `Post.reply_remote_id`. GoToSocial skips the ids of
|
||||
favourites and boosts (`favourite:…`, `reblog:…`). Bluesky only takes
|
||||
`app.bsky.feed.post` URIs. Threads only takes numeric media ids. The
|
||||
Threads API can't look up other people's posts by URL, so only our own
|
||||
posts thread there.
|
||||
|
||||
### Bluesky threads
|
||||
|
||||
A reply's `root` must be the top of the thread. The parent is fetched with
|
||||
`app.bsky.feed.getPosts`. If the parent is itself a reply, its
|
||||
`record.reply.root` is used; otherwise the parent is the root.
|
||||
|
||||
## Not changed
|
||||
|
||||
- Crossposts made before this release. Edits can't move a status into a
|
||||
thread (GoToSocial, Mastodon), and Bluesky and Threads posts can't be edited at
|
||||
all. Re-threading would mean deleting and reposting, which loses likes and
|
||||
boosts. The user chose to leave them.
|
||||
- An edit of a reply on GoToSocial keeps the status where it is, and its
|
||||
text keeps the mention (`_prepare` resolves the parent again).
|
||||
- Fediverse authors bridged into Bluesky by Bridgy Fed have a copy of
|
||||
their post there. There is no reliable way to find its URI from the
|
||||
original URL, so these get the reply line.
|
||||
|
||||
## Tests
|
||||
|
||||
`tests/test_reply_crossposts.py`: native fediverse reply with mention, no
|
||||
mention for our own account, reply line with name and host fallback,
|
||||
Bluesky root/parent, Bluesky reply line with its link facet, Threads native
|
||||
reply only to our own posts, the line surviving shortening, and a reply to
|
||||
our own note threading on GoToSocial and Bluesky. The reply is addressed both
|
||||
by the note's permalink and by its GoToSocial crosspost URL.
|
||||
Reference in new issue
Block a user