fix: explicit m.mentions for ticket notifications and roasts (ahead of Synapse 1.164) #42

Merged
jared merged 1 commits from fix/explicit-mentions into main 2026-10-27 20:06:14 -04:00
Owner

Why: Synapse 1.164 turns on MSC4210 by default. The legacy push rules that pinged when a user ID or display name appeared in a message body are removed, so a message only notifies the users listed in m.mentions.

Audit of what we send

  • Lotus Chat: already sends m.mentions, including for reply mentions. No change needed.
  • hookshot/tinker-tickets.js deliberately pings assignees and watchers (notify_users) with matrix.to links. These pings would stop. Fixed: the transform now returns mentions: { user_ids: notifyUsers }, a field hookshot 7.3.2's v2 transforms support.
  • matrixbot:
    • !roast names its target; it now mentions them when they're given as a full Matrix ID (send_html(..., mention_user_ids=[...]));
    • the Wordle, riddle and RPS winner announcements stay without a ping, since the player is already in the room;
    • no @room is sent anywhere.
  • Other hookshot transforms: they don't mention users.

Works on 1.163 as well. m.mentions is already honoured, so this can go in before the Synapse upgrade.

Deploy: merging to main triggers the LXC 151 hook. It runs hookshot/deploy.sh for the transform and copies plus restarts matrixbot.

Checks: eslint (hookshot) and ruff (matrixbot) pass locally; py_compile and node --check pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

**Why:** Synapse 1.164 turns on MSC4210 by default. The legacy push rules that pinged when a user ID or display name appeared in a message body are removed, so a message only notifies the users listed in `m.mentions`. **Audit of what we send** - **Lotus Chat:** already sends `m.mentions`, including for reply mentions. No change needed. - **`hookshot/tinker-tickets.js`** deliberately pings assignees and watchers (`notify_users`) with matrix.to links. **These pings would stop.** Fixed: the transform now returns `mentions: { user_ids: notifyUsers }`, a field hookshot 7.3.2's v2 transforms support. - **matrixbot:** - `!roast` names its target; it now mentions them when they're given as a full Matrix ID (`send_html(..., mention_user_ids=[...])`); - the Wordle, riddle and RPS winner announcements stay without a ping, since the player is already in the room; - no `@room` is sent anywhere. - **Other hookshot transforms:** they don't mention users. **Works on 1.163 as well.** `m.mentions` is already honoured, so this can go in before the Synapse upgrade. **Deploy:** merging to `main` triggers the LXC 151 hook. It runs `hookshot/deploy.sh` for the transform and copies plus restarts `matrixbot`. **Checks:** eslint (hookshot) and ruff (matrixbot) pass locally; `py_compile` and `node --check` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-27 20:04:40 -04:00
fix: explicit m.mentions for ticket notifications and roasts (ahead of Synapse 1.164)
Lint / Shell (shellcheck) (push) Successful in 11s
Lint / JS (eslint) (push) Successful in 12s
Lint / Landing page is rendered (matrix (push) Successful in 5s
Lint / No secrets in webhook configs (push) Successful in 5s
Lint / Python (ruff) (push) Successful in 7s
Lint / Secret scan (gitleaks) (push) Successful in 6s
Lint / Shell (shellcheck) (pull_request) Successful in 10s
Lint / JS (eslint) (pull_request) Successful in 9s
Lint / No secrets in webhook configs (pull_request) Successful in 5s
Lint / Python deps (pip-audit) (push) Successful in 43s
Lint / Landing page is rendered (matrix (pull_request) Successful in 4s
Lint / Python (ruff) (pull_request) Successful in 7s
Lint / Secret scan (gitleaks) (pull_request) Successful in 6s
Lint / Python deps (pip-audit) (pull_request) Successful in 39s
e1b2c8575c
Synapse 1.164 turns on MSC4210 by default: the legacy push rules that
pinged when a user ID or display name appeared in the body are removed, so
a message only notifies the users listed in m.mentions.

- hookshot/tinker-tickets.js deliberately pings assignees/watchers
  (notify_users) with matrix.to links; those pings would stop. Return
  mentions: { user_ids: notifyUsers } (hookshot 7.3.2 v2 transforms
  support it).
- matrixbot: send_html takes optional mention_user_ids; !roast mentions the
  target when given as a full Matrix ID. Winner announcements stay without
  a ping (the player is already in the room).

No @room is sent anywhere. Lotus Chat already sends m.mentions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared scheduled this pull request to auto merge when all checks succeed 2026-10-27 20:04:47 -04:00
jared merged commit 6b39bd931e into main 2026-10-27 20:06:14 -04:00
Sign in to join this conversation.