mirror of
https://github.com/block/buzz.git
synced 2026-11-24 02:02:07 +00:00
## Summary A message that `p`-tags someone in a listed channel they haven't joined now sends them a push. Before this, push woke only channel members. This is the relay part of "Let them know", a choice for mentioning people outside a public channel. The client changes are https://github.com/block/buzz-app/pull/3769, https://github.com/block/buzz-app/pull/3771 and https://github.com/block/buzz/pull/9629. - The matcher wakes a non-member only when a `p` tag names them and the channel is open, not unlisted, and a stream or forum. It reuses the channel directory's `LISTED_CHANNEL_SQL`. - Delivery checks again before sending. The channel must still be listed, the event must still mention them, and they must still be able to connect. A ban on them or their agent's owner blocks the push, and so does a missing membership or allowlist entry when the relay requires one. - Members, private and unlisted channels, DMs and system channels are unchanged. **Needs security review.** This decides who gets push wakes. A wake goes only to someone who could already read the event with `REQ`, and it carries no message content. Follow-up: a banned or removed channel member still gets wakes until their lease expires. That predates this PR, and the fix belongs in the ban and removal code. ### Related issue None found. ### Testing - Postgres tests run ingest through delivery against a fake gateway. They cover private, unlisted and system channels, a switch to private before delivery, bans, removal, a missing allowlist entry, and an agent relying on its owner's membership. I made 20 small changes that each broke one of these checks, and each one made a test fail. - On a local relay with a stand-in gateway, an outsider's mention push arrived, and nothing went out after a ban, a removal or a switch to private. With the new delivery check turned off, the banned and removed people got pushes. - Not tested: a real gateway and a phone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Soheyl Vakili <soheyl@squareup.com> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Tom Brow <tomb@block.xyz>