Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490757
D6186.id20634.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
D6186.id20634.diff
View Options
diff --git a/keyserver/src/creators/message-creator.js b/keyserver/src/creators/message-creator.js
--- a/keyserver/src/creators/message-creator.js
+++ b/keyserver/src/creators/message-creator.js
@@ -26,7 +26,10 @@
appendSQLArray,
mergeOrConditions,
} from '../database/database';
-import { fetchMessageInfoForLocalID } from '../fetchers/message-fetchers';
+import {
+ fetchMessageInfoForLocalID,
+ fetchMessageInfoByID,
+} from '../fetchers/message-fetchers';
import { fetchOtherSessionsForViewer } from '../fetchers/session-fetchers';
import { fetchServerThreadInfos } from '../fetchers/thread-fetchers';
import { sendPushNotifs } from '../push/send';
@@ -378,7 +381,16 @@
invariant(messageIndices, `indices should exist for thread ${threadID}`);
for (const messageIndex of messageIndices) {
const messageInfo = messageInfos[messageIndex];
- if (
+ if (messageInfo.type === messageTypes.REACTION) {
+ const targetMessageInfo = await fetchMessageInfoByID(
+ viewer,
+ messageInfo.targetMessageID,
+ );
+ if (targetMessageInfo?.creatorID !== userID) {
+ continue;
+ }
+ userPushInfo.messageInfos.push(messageInfo);
+ } else if (
(messageInfo.type !== messageTypes.CREATE_SUB_THREAD ||
subthreadsCanNotify.has(messageInfo.childThreadID)) &&
messageTypeGeneratesNotifs(messageInfo.type) &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 5:30 PM (11 m, 23 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2678140
Default Alt Text
D6186.id20634.diff (1 KB)
Attached To
Mode
D6186: [keyserver] reaction messages only notifiy author of target message
Attached
Detach File
Event Timeline
Log In to Comment