Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3494886
D6307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
821 B
Referenced Files
None
Subscribers
None
D6307.diff
View Options
diff --git a/lib/shared/messages/reaction-message-spec.js b/lib/shared/messages/reaction-message-spec.js
--- a/lib/shared/messages/reaction-message-spec.js
+++ b/lib/shared/messages/reaction-message-spec.js
@@ -202,12 +202,16 @@
messageData: ReactionMessageData,
params: GeneratesNotifsParams,
) => {
+ const { action } = rawMessageInfo;
const { notifTargetUserID, fetchMessageInfoByID } = params;
+
const targetMessageInfo = await fetchMessageInfoByID(
rawMessageInfo.targetMessageID,
);
- return targetMessageInfo?.creatorID === notifTargetUserID
- ? pushTypes.NOTIF
- : undefined;
+
+ if (targetMessageInfo?.creatorID !== notifTargetUserID) {
+ return undefined;
+ }
+ return action === 'add_reaction' ? pushTypes.NOTIF : pushTypes.RESCIND;
},
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 7:03 AM (20 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2680866
Default Alt Text
D6307.diff (821 B)
Attached To
Mode
D6307: [lib] modify reaction message generatesNotifs function to return a pushType based on the reaction action
Attached
Detach File
Event Timeline
Log In to Comment