Skip to content

fix: Displays mentions as links when the mention URL doesn't match#2263

Merged
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:missing-mention
Apr 30, 2026
Merged

fix: Displays mentions as links when the mention URL doesn't match#2263
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:missing-mention

Conversation

@nikclayton

Copy link
Copy Markdown
Contributor

To resolve mentions Pachli compares the a.href of the link to the mention.url properties in the status.

If it doesn't match the previous code was returning null from getCustomSpanForMention. This removed the URLSpan from the mention, rendering it unlinked.

Fallback to MaybeUnderlineURLSpan in this case, so the mention is still clickable. It will almost certainly open the account in the user's browser (because the search to lookup the account will probably fail) but this is better than it not being clickable, and matches the behaviour of the web UI.

Reported by @badnetmask@hachyderm.io, @ozoned@btfree.social

To resolve mentions Pachli compares the `a.href` of the link to the
`mention.url` properties in the status.

If it doesn't match the previous code was returning null from
`getCustomSpanForMention`. This removed the `URLSpan` from the mention,
rendering it unlinked.

Fallback to `MaybeUnderlineURLSpan` in this case, so the mention is still
clickable. It will almost certainly open the account in the user's browser
(because the search to lookup the account will probably fail) but this is
better than it not being clickable, and matches the behaviour of the web
UI.

Reported by @badnetmask@hachyderm.io, @ozoned@btfree.social
@nikclayton nikclayton merged commit a62a029 into pachli:main Apr 30, 2026
52 of 53 checks passed
@nikclayton nikclayton deleted the missing-mention branch April 30, 2026 22:41
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