web(realtime): refresh chat info panel on chat updates
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user