realtime: emit and handle chat_deleted for full chat removals
All checks were successful
CI / test (push) Successful in 38s
All checks were successful
CI / test (push) Successful in 38s
This commit is contained in:
@@ -140,6 +140,13 @@ export function useRealtime() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.event === "chat_deleted") {
|
||||
const chatId = Number(event.payload.chat_id);
|
||||
if (Number.isFinite(chatId)) {
|
||||
chatStore.removeChat(chatId);
|
||||
scheduleReloadChats();
|
||||
}
|
||||
}
|
||||
if (event.event === "pong") {
|
||||
lastPongAtRef.current = Date.now();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user