Kick: deleted and moderated messages stay in the buffer #63

Closed
opened 2026-09-02 00:04:08 -04:00 by Salastil · 1 comment
Owner

MessageDeletedEvent and ChatroomUpdatedEvent are explicitly matched and ignored (backend/kick/mod.rs:929-930). UserBannedEvent, UserUnbannedEvent, ChatroomClearEvent and the pinned-message events have no arm at all and fall through describe_action's catch-all.

So a message a moderator removed stays on screen in moho, and a chat clear does nothing. On a stream where moderation is visible to everyone, this makes moho show a different chat from the one everybody else is looking at.

Done looks like: MessageDeletedEvent calls runtime.delete_message, ChatroomClearEvent empties the buffer, and bans/unbans become system lines. runtime.delete_message already exists and is used by the Sneedchat backend.

`MessageDeletedEvent` and `ChatroomUpdatedEvent` are explicitly matched and ignored (`backend/kick/mod.rs:929-930`). `UserBannedEvent`, `UserUnbannedEvent`, `ChatroomClearEvent` and the pinned-message events have no arm at all and fall through `describe_action`'s catch-all. So a message a moderator removed stays on screen in moho, and a chat clear does nothing. On a stream where moderation is visible to everyone, this makes moho show a different chat from the one everybody else is looking at. **Done looks like:** `MessageDeletedEvent` calls `runtime.delete_message`, `ChatroomClearEvent` empties the buffer, and bans/unbans become system lines. `runtime.delete_message` already exists and is used by the Sneedchat backend.
Author
Owner

Finished — https://git.salastil.com/Salastil/nobilis/commit/0cd38df

MessageDeletedEvent was matched and explicitly ignored, so a message a moderator removed stayed on screen — moho showing a different chat from the one everybody else in the room was looking at. On a stream where moderation is public that is the wrong way round entirely.

Now handled: a deleted message is removed via the same runtime.delete_message the Sneedchat backend uses, ChatroomClearEvent empties the buffer, and UserBannedEvent/UserUnbannedEvent become lines in the channel. A ban and a timeout are told apart by whether the event carries an expiry, since that is the whole of what a reader wants to know from the line.

The id is read from either message.id or a flat id — Kick has sent both shapes, and both name the same thing.

Finished — https://git.salastil.com/Salastil/nobilis/commit/0cd38df `MessageDeletedEvent` was matched and explicitly ignored, so a message a moderator removed stayed on screen — moho showing a different chat from the one everybody else in the room was looking at. On a stream where moderation is public that is the wrong way round entirely. Now handled: a deleted message is removed via the same `runtime.delete_message` the Sneedchat backend uses, `ChatroomClearEvent` empties the buffer, and `UserBannedEvent`/`UserUnbannedEvent` become lines in the channel. A ban and a timeout are told apart by whether the event carries an expiry, since that is the whole of what a reader wants to know from the line. The id is read from either `message.id` or a flat `id` — Kick has sent both shapes, and both name the same thing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#63