From 4ae61dc4e1dcca6ae24131fcd9acc55124e3c0af Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 9 Oct 2026 12:16:51 +0200 Subject: feat: let the operator purge a group's chat (MNP 6.1) Signed chat_purge from the Chat settings deletes every stored message; epoch keys and attachments stay. The ack is broadcast so open chat panels empty. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/src/meshbay_hub/static/chat-app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-hub/src/meshbay_hub/static/chat-app.js') diff --git a/packages/meshbay-hub/src/meshbay_hub/static/chat-app.js b/packages/meshbay-hub/src/meshbay_hub/static/chat-app.js index 0057218..1d61c43 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/chat-app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/chat-app.js @@ -278,7 +278,13 @@ function ChatPanel({ transportRef, username, userId, entries, gekRef, if (!atBottomRef.current) setUnreadFrom(prev => prev ?? id); }; - return () => { transport.onChat = null; }; + transport.onChatPurged = () => { + setMessages([]); + setHasMore(false); + setUnreadFrom(null); + }; + + return () => { transport.onChat = null; transport.onChatPurged = null; }; }, [status]); const loadOlder = useCallback(async () => { -- cgit v1.2.3