Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3299807
D13427.id44422.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
D13427.id44422.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13427: [lib] implement reply count for composable DM messages
Attached
Detach File
Event Timeline
Log In to Comment