Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3491695
D4330.id13745.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4330.id13745.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 7:56 PM (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2678225
Default Alt Text
D4330.id13745.diff (1 KB)
Attached To
Mode
D4330: [lib] Update `messageStore.messages` with `msgStoreOps` for `sendText/MultimediaMessage.started` actions
Attached
Detach File
Event Timeline
Log In to Comment