feat: log only out of sync updated_at

This commit is contained in:
Shivam Mishra
2025-03-11 12:27:45 +05:30
parent 8ff45bcd60
commit 933a3bd5ff
@@ -216,7 +216,7 @@ export const mutations = {
const selectedConversation = allConversations[index];
// ignore out of order events
if (conversation.updated_at <= selectedConversation.updated_at) {
if (conversation.updated_at < selectedConversation.updated_at) {
Sentry.withScope(scope => {
scope.setContext('incoming', conversation);
scope.setContext('stored', selectedConversation);
@@ -226,6 +226,10 @@ export const mutations = {
return;
}
if (conversation.updated_at === selectedConversation.updated_at) {
return;
}
const { messages, ...updates } = conversation;
allConversations[index] = { ...selectedConversation, ...updates };
if (_state.selectedChatId === conversation.id) {