Skip to content

Mentions in remote fediverse posts link to their account (v7.207.0) - #1258

Merged
wintermeyer merged 1 commit into
mainfrom
worktree-fediverse-accounts-in-posts
Jul 31, 2026
Merged

Mentions in remote fediverse posts link to their account (v7.207.0)#1258
wintermeyer merged 1 commit into
mainfrom
worktree-fediverse-accounts-in-posts

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

TL;DR A mention in a remote fediverse post (e.g. @herrkaschke in a Mastodon post shown in the feed) is now stored as its full @user@host address, which the renderer links to the account on its home server.

Where: Vutuv.RemoteHtml.to_text/3 (the one remote-HTML reducer), the content call sites in Vutuv.Fediverse (cached posts, inbound replies, Update/refresh paths) and Vutuv.Mastodon (profile feed, REST mentions normalized to the AP Mention-tag shape).
Now: the remote HTML renders a mention as the bare @user; the strip loses the anchor that carried the host, and render_remote deliberately leaves a bare @name unlinked — so mentioned accounts were dead text.
Want: the reducer widens @user to @user@host from the object's Mention tags; VutuvWeb.Markdown already links that form to https://host/@user — no renderer change.

Guards: expansion only when unambiguous (two accounts sharing one short name stay plain), only when the result matches the shared entity grammar, never for this installation's own host; tag count capped against hostile deliveries; the clamp still bounds the stored text. Already-stored posts keep their short forms and age out via retention.

Deploy: hot (no migrations, no config/supervision/deps changes). Version bump to 7.207.0 (minor, user-facing feature).

An AI agent wrote this text in my name, unreviewed by me. The work behind it is mine; I only delegated the writing.

A Mastodon post shown here renders a mention as the bare short form
("@herrkaschke") because that is all the remote HTML's visible text
carries once our reducer strips the anchor around it - the host lives
only in that anchor and in the object's Mention tags. The renderer
deliberately leaves a bare @name in remote content unlinked (it would
point at whatever vutuv member shares the handle), so mentioned
accounts sat on the card as dead text.

Vutuv.RemoteHtml.to_text/3 now takes those Mention tags and widens each
short form to the full @user@host, which VutuvWeb.Markdown already
links to the remote profile like any typed fediverse handle - no
renderer change, and the agent-format siblings carry the more precise
address for free. Every fediverse content path hands the tags along
(cached posts of followed accounts, inbound replies, the Update and
refresh paths), and the Mastodon profile feed normalizes its REST
mentions array to the same shape.

Deliberate limits: an expansion only happens when it is unambiguous
(two mentioned accounts sharing one short name stay plain - never guess
which the author meant), when the result matches the shared entity
grammar (so a dotted Misskey name is not half-linked), and when the
host is not this very installation (the renderer would link straight
back at a page vutuv does not serve). Already-stored posts keep their
short forms; they age out via the retention ceiling.

An AI agent wrote this text in my name, unreviewed by me. The work
behind it is mine; I only delegated the writing.
@wintermeyer
wintermeyer merged commit de51d79 into main Jul 31, 2026
1 check passed
@wintermeyer
wintermeyer deleted the worktree-fediverse-accounts-in-posts branch July 31, 2026 10:31
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

Successfully merging this pull request may close these issues.

1 participant