fix(web): prevent date parsing sort drop to top of history for real-time messages

This commit is contained in:
2026-07-27 09:46:42 -04:00
parent 43b20c5ce3
commit 83c6badc20
3 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -128,7 +128,6 @@ export const useWebSocketStore = create<WebSocketState>((set, get) => ({
return;
}
const addMessage = useMessageStore.getState().addMessage;
const updateMessage = useMessageStore.getState().updateMessage;
const removeMessage = useMessageStore.getState().removeMessage;
const addReaction = useMessageStore.getState().addReaction;
@@ -155,7 +154,7 @@ export const useWebSocketStore = create<WebSocketState>((set, get) => ({
} else {
const msg = payload as unknown as Message;
const normalizedMsg = { ...msg, channel_id: (msg.channel_id || '').toLowerCase() };
addMessage(normalizedMsg);
useMessageStore.getState().addMessage(normalizedMsg);
// Desktop notification
const currentUserId = useAuthStore.getState().user?.id;