Steps to reproduce
- Send a payload via maubot/matrix-hookshot etc that contains both
content.body and content.formatted_body.
Outcome
What did you expect?
Previous behavior: notification shows content.body -> short, clean message text
What happened instead?
Current behavior: notification shows formatted_body.textContent -> full content including quoted/embedded blocks, making notifications convoluted and hard to read
The PR #31699 introducing getNotificationBodyWithoutSpoilers changed notification text to be derived from formatted_body (via textContent) when present, rather than content.body.
This is a regression for bots, webhooks, and integrations (e.g. Hookshot) that intentionally set a short, human-readable body alongside a richer formatted_body containing additional content such as blockquotes. The body field was previously used for notification text, keeping it concise and readable. Authors of these integrations reasonably relied on this behavior.
Suggested fix: Either:
- Strip
<blockquote> elements from notification text alongside spoilers (since they represent quoted/external content rather than the sender's own words), or
- Prefer
content.body as the notification text baseline, and handle spoilers separately rather than switching the source field entirely
Related:
Issue #17859 is seemingly the same class of problem.
Operating system
Linux
Browser information
Firefox 150.0.1
URL for webapp
v1.12.17
Application version
1.12.17
Homeserver
Synapse 1.152.0
Will you send logs?
No
Steps to reproduce
content.bodyandcontent.formatted_body.Outcome
What did you expect?
Previous behavior: notification shows
content.body-> short, clean message textWhat happened instead?
Current behavior: notification shows
formatted_body.textContent-> full content including quoted/embedded blocks, making notifications convoluted and hard to readThe PR #31699 introducing
getNotificationBodyWithoutSpoilerschanged notification text to be derived fromformatted_body(viatextContent) when present, rather thancontent.body.This is a regression for bots, webhooks, and integrations (e.g. Hookshot) that intentionally set a short, human-readable
bodyalongside a richerformatted_bodycontaining additional content such as blockquotes. Thebodyfield was previously used for notification text, keeping it concise and readable. Authors of these integrations reasonably relied on this behavior.Suggested fix: Either:
<blockquote>elements from notification text alongside spoilers (since they represent quoted/external content rather than the sender's own words), orcontent.bodyas the notification text baseline, and handle spoilers separately rather than switching the source field entirelyRelated:
Issue #17859 is seemingly the same class of problem.
Operating system
Linux
Browser information
Firefox 150.0.1
URL for webapp
v1.12.17
Application version
1.12.17
Homeserver
Synapse 1.152.0
Will you send logs?
No