Skip to content

Link mentions, hashtags and links in the language maps too - #4065

Open
pfefferle wants to merge 1 commit into
trunkfrom
fix/mention-summary-map
Open

pfefferle wants to merge 1 commit into
trunkfrom
fix/mention-summary-map

Conversation

@pfefferle

@pfefferle pfefferle commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Fixes #4064

Proposed changes:

  • Mention::filter_activity_object() linked mentions in summary, but not in summaryMap, which is built earlier from the plain summary. So the two differed, and GoToSocial showed the mention as @user <https://…>.
  • The maps hold the same text in other languages, so they should get the same links. Mention, Hashtag and Link now also link every value in summaryMap and contentMap. This also covers translations that plugins add through activitypub_transform_set_summary_map and activitypub_transform_set_content_map.
  • Hashtag and Link keep the is_actor() check for summaryMap, the same as for summary, so the summary of a post stays plain text (Improve summary generation #2063).

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Publish a post with a title that mentions someone, for example @searls@mastodon.social nails it….
  • Open the post with ?activitypub (or fetch it with Accept: application/activity+json).
  • summary and the value in summaryMap are the same, both with the linked mention.
  • contentMap matches content.

Changelog entry

  • Automatically create a changelog entry from the details below.

The entry is in .github/changelog/fix-mention-summary-map.

@pfefferle pfefferle added the Bug Something isn't working label Nov 12, 2026
@pfefferle pfefferle self-assigned this Nov 12, 2026
@pfefferle
pfefferle requested review from a team and jeherve November 12, 2026 11:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mentions in an Article summary show up as @user <https://…> in GoToSocial content warnings

1 participant