Page MenuHomePhabricator

D4330.id13745.diff
No OneTemporary

D4330.id13745.diff

diff --git a/lib/reducers/message-reducer.js b/lib/reducers/message-reducer.js
--- a/lib/reducers/message-reducer.js
+++ b/lib/reducers/message-reducer.js
@@ -1005,14 +1005,15 @@
lastPruned: thread?.lastPruned ?? now,
},
};
-
- const newMessageStore = { ...messageStore, messages, threads, local };
- assertMessageStoreMessagesAreEqual(
- processedMessageStore,
- newMessageStore,
- action.type,
- );
- return { messageStoreOperations, messageStore: newMessageStore };
+ return {
+ messageStoreOperations,
+ messageStore: {
+ ...messageStore,
+ messages: processedMessageStore.messages,
+ threads,
+ local,
+ },
+ };
}
for (const existingMessageID of messageIDs) {
@@ -1034,26 +1035,18 @@
lastPruned: now,
};
- const newMessageStore = {
- messages: {
- ...messageStore.messages,
- [localID]: payload,
- },
- threads: {
- ...messageStore.threads,
- [threadID]: threadState,
+ return {
+ messageStoreOperations,
+ messageStore: {
+ messages: processedMessageStore.messages,
+ threads: {
+ ...messageStore.threads,
+ [threadID]: threadState,
+ },
+ local: messageStore.local,
+ currentAsOf: messageStore.currentAsOf,
},
- local: messageStore.local,
- currentAsOf: messageStore.currentAsOf,
};
-
- assertMessageStoreMessagesAreEqual(
- processedMessageStore,
- newMessageStore,
- action.type,
- );
-
- return { messageStoreOperations, messageStore: newMessageStore };
} else if (
action.type === sendTextMessageActionTypes.failed ||
action.type === sendMultimediaMessageActionTypes.failed

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 12:56 AM (5 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684275
Default Alt Text
D4330.id13745.diff (1 KB)

Event Timeline