Page MenuHomePhabricator

D13427.id44422.diff
No OneTemporary

D13427.id44422.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
@@ -318,16 +318,34 @@
utilities,
);
- const notificationsCreationData = await dmOpSpecs[
- op.type
- ].notificationsCreationData?.(op, utilities);
+ const spec = dmOpSpecs[op.type];
+
+ const notificationsCreationDataPromise: Promise<?NotificationsCreationData> =
+ (async () => {
+ if (!spec?.notificationsCreationData) {
+ return null;
+ }
+ return await spec.notificationsCreationData(op, utilities);
+ })();
+
+ const [{ rawMessageInfos, updateInfos }, notificationsCreationData] =
+ await Promise.all([
+ dmOpSpecs[op.type].processDMOperation(op, utilities),
+ notificationsCreationDataPromise,
+ ]);
+
+ const newUpdateInfos = getThreadUpdatesForNewMessages(
+ rawMessageInfos,
+ updateInfos,
+ utilities,
+ );
dispatchWithMetadata(
{
type: processDMOpsActionType,
payload: {
rawMessageInfos: [],
- updateInfos: [],
+ updateInfos: newUpdateInfos,
outboundP2PMessages,
composableMessageID,
notificationsCreationData,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 3:42 PM (17 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535181
Default Alt Text
D13427.id44422.diff (1 KB)

Event Timeline