feature: hide blocked players in chat - #449
Merged
Merged
Conversation
This was referenced Sep 28, 2026
lukepolo
force-pushed
the
feature/chat-reactions
branch
from
September 29, 2026 00:52
4580a4e to
8754dee
Compare
A DM between a blocked pair is refused both ways (an explicit isBlockedEitherWay beside the friendship check) and leaves the blocker's rail only. In group rooms the blocker never sees what the blocked player says: join history and the draft-to-match resend are filtered per recipient, :chat and :edited skip recipients who blocked the author, and notifyLobbyMembers drops them. The block trigger blanks the blocker's existing chat bell rows from the blocked player. One player_blocks query per fan-out or history load.
…in cleanup A block that commits between a send's check and its writes no longer gets through: the DM insert itself refuses a blocked pair (and with it the rail, delivery and bell), direct:incoming re-checks the recipient, and the bell catch-up blanks rows aimed at a recipient who blocked the sender meanwhile. A DM room is only reachable under its canonical id, the one the block trigger and the rail filter match. The join's close handler is registered before anything that can fail, and failed broadcasts are logged rather than left unhandled.
A send, an edit or a draft's re-sent history whose broadcast rejects (the block lookup it now runs, say) was a void promise with no handler.
lukepolo
force-pushed
the
feature/chat-blocks
branch
from
September 29, 2026 00:54
2ea2f24 to
dba2ed1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The chat side of player blocking (#441): the blocker never sees the blocked player's chat, and DMs between the pair close both ways.
not_allowed; the conversation leaves the blocker's rail only:chat/:editedand bell rows skip anyone who blocked the author, with one indexed query per fan-outdirect:incoming), and the bell catch-up blanks rows written after itMerge/deploy: stacked on #445, with #441 merged in. Merge last, after #441 and 5stackgg/web#626. Pairs with 5stackgg/web#628.
Not covered: in-game chat can't be filtered per player, and presence (
:list,:joined,:left) still shows a blocked player.Tests: a test fails without each fix: the DM mid-send race (SQL), the
direct:incomingre-check, the bell catch-up after a late block, the non-canonical room id, the close-handler order, and (new tests) failed broadcasts being logged.