Page MenuHomePhabricator

D6186.id20634.diff
No OneTemporary

D6186.id20634.diff

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

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)

Event Timeline