web: fix auth session races, ws token drift, and unread clear behavior
Some checks failed
CI / test (push) Failing after 2m20s
Some checks failed
CI / test (push) Failing after 2m20s
This commit is contained in:
@@ -160,7 +160,7 @@ export function useRealtime() {
|
||||
window.dispatchEvent(new CustomEvent("bm:chat-updated", { detail: { chatId } }));
|
||||
scheduleReloadChats();
|
||||
if (chatStore.activeChatId === chatId || (chatStore.messagesByChat[chatId]?.length ?? 0) > 0) {
|
||||
void chatStore.loadMessages(chatId);
|
||||
void chatStore.loadMessages(chatId, { markRead: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -398,7 +398,7 @@ export function useRealtime() {
|
||||
uniqueChatIds.add(storeAfter.activeChatId);
|
||||
}
|
||||
for (const chatId of uniqueChatIds) {
|
||||
await storeAfter.loadMessages(chatId);
|
||||
await storeAfter.loadMessages(chatId, { markRead: false });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user