Page MenuHomePhabricator

D13352.id.diff
No OneTemporary

D13352.id.diff

diff --git a/lib/shared/dm-ops/process-dm-ops.js b/lib/shared/dm-ops/process-dm-ops.js
--- a/lib/shared/dm-ops/process-dm-ops.js
+++ b/lib/shared/dm-ops/process-dm-ops.js
@@ -332,6 +332,8 @@
const allPeerUserIDAndDeviceIDs = useSelector(getAllPeerUserIDAndDeviceIDs);
const currentUserInfo = useSelector(state => state.currentUserInfo);
const utilities = useSendDMOperationUtils();
+ const { processOutboundMessages } = usePeerToPeerCommunication();
+ const localMessageInfos = useSelector(state => state.messageStore.local);
return React.useCallback(
async (
@@ -341,6 +343,15 @@
const { op, composableMessageID, recipients } = dmOperationSpecification;
+ const localMessageInfo = localMessageInfos[composableMessageID];
+ if (
+ localMessageInfo?.outboundP2PMessageIDs &&
+ localMessageInfo.outboundP2PMessageIDs.length > 0
+ ) {
+ processOutboundMessages(localMessageInfo.outboundP2PMessageIDs, dmOpID);
+ return promise;
+ }
+
const outboundP2PMessages = await createMessagesToPeersFromDMOp(
op,
recipients,
@@ -376,6 +387,8 @@
currentUserInfo,
dispatchWithMetadata,
getDMOpsSendingPromise,
+ localMessageInfos,
+ processOutboundMessages,
threadInfos,
utilities,
],

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 9:54 PM (19 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696759
Default Alt Text
D13352.id.diff (1 KB)

Event Timeline