web(realtime): refresh chat info panel on chat updates
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
2026-03-08 18:56:54 +03:00
parent 661f8acf63
commit 8830192642
3 changed files with 64 additions and 47 deletions

View File

@@ -133,6 +133,7 @@ export function useRealtime() {
if (event.event === "chat_updated") {
const chatId = Number(event.payload.chat_id);
if (Number.isFinite(chatId)) {
window.dispatchEvent(new CustomEvent("bm:chat-updated", { detail: { chatId } }));
scheduleReloadChats();
if (chatStore.activeChatId === chatId || (chatStore.messagesByChat[chatId]?.length ?? 0) > 0) {
void chatStore.loadMessages(chatId);