Merged in release/2024-11-22 (pull request #1976)

feature/IO-3000-messaging-sockets-migration2 -
This commit is contained in:
Dave Richer
2024-11-29 16:58:32 +00:00

View File

@@ -44,7 +44,6 @@ function ChatConversationContainer({ bodyshop, selectedConversation }) {
messages.forEach((message) => {
const messageRef = client.cache.identify(message);
// Write the new message to the cache
client.cache.writeFragment({
id: messageRef,
@@ -72,6 +71,9 @@ function ChatConversationContainer({ bodyshop, selectedConversation }) {
const alreadyExists = existingMessages.some((msg) => msg.__ref === messageRef);
if (alreadyExists) return existingMessages;
return [...existingMessages, { __ref: messageRef }];
},
updated_at() {
return message.created_at;
}
}
});
@@ -91,13 +93,6 @@ function ChatConversationContainer({ bodyshop, selectedConversation }) {
}
});
});
client.cache.modify({
id: client.cache.identify({ __typename: "conversations", id: conversationId }),
fields: {
unreadcnt: () => 0
}
});
},
[client.cache]
);