mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-02 01:42:53 -05:00
refac
This commit is contained in:
1 parent
bc410a62bd
commit
abdaa9d143
1 file changed
+5
-2
@@ -1837,8 +1837,8 @@
|
||||
const connectionId = socket?.id;
|
||||
if (next && socket)
|
||||
socket.emit('events:chat', { chat_id: next, data: { type: 'join' } }, (accepted: boolean) => {
|
||||
if (!socket.connected || socket.id !== connectionId || $chatId !== next) return;
|
||||
if (!accepted) clearPresence();
|
||||
if (accepted || !socket.connected || socket.id !== connectionId || $chatId !== next) return;
|
||||
clearPresence();
|
||||
// A refused join can mean access was lost; the refresh then sends the reader home.
|
||||
void refreshChat();
|
||||
});
|
||||
@@ -2325,6 +2325,8 @@
|
||||
}
|
||||
joinedChatId = '';
|
||||
syncChatRoom($socket, $chatId, $temporaryChat);
|
||||
// Updates sent while disconnected were missed.
|
||||
void refreshChat();
|
||||
const id = $chatId;
|
||||
const tasks = await getTaskIdsByChatId(localStorage.token, id).catch(() => null);
|
||||
if ($chatId !== id || !tasks) return;
|
||||
@@ -3580,6 +3582,7 @@
|
||||
// nodes from failed regenerations (#24424, #24157, #20474)
|
||||
sanitizeHistory(history);
|
||||
cachedHistory = cached ? { ...history, messages: { ...history.messages } } : null;
|
||||
if (cached) void refreshChat();
|
||||
|
||||
chatTitle.set(chatContent.title);
|
||||
branchPointMessageId =
|
||||
|
||||
Reference in new issue
Block a user