feat: message editing and typing indicators (Phase 7 & 8) #6
Loading…
Reference in a new issue
No description provided.
Delete branch "long-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Admins and moderators can edit any message. An (edited) label appears on modified
messages, and edits propagate in real time over WebSocket.
another user is actively composing a message in the same room or DM. Purely
ephemeral — no database writes.
Changes
Phase 7 — Message Editing
enforces max_message_length, writes to DB, broadcasts ChatEvent::MessageEdited
over WebSocket
(edited) label, WS event handler to refresh on remote edits
is rejected, empty/oversized body is rejected
Phase 8 — Typing Indicators
the first keystroke of a new session; spawns a 5s eviction task that sends
UserStoppedTyping on silence; excludes the sender from their own broadcast
Signal<Vec<(user_id, username)>> for currently-typing users, "Alice is typing…"
label above the composer
Test plan
(edited) label
shows indicator in the other; stops after 5s of silence