Skip to content

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

Merged
pfefferle merged 4 commits into
trunkfrom
fix/mention-summary-map
Nov 16, 2026
Merged

pfefferle merged 4 commits into
trunkfrom
fix/mention-summary-map

Conversation

@pfefferle

@pfefferle pfefferle commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Part of #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
@pfefferle
pfefferle merged commit 370a2a9 into trunk Nov 16, 2026
12 checks passed
@pfefferle
pfefferle deleted the fix/mention-summary-map branch November 16, 2026 07:25
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.

1 participant