Page MenuHomePhabricator

D6866.diff
No OneTemporary

D6866.diff

diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -126,7 +126,7 @@
]);
const [firstNewMessageInfo, ...remainingNewMessageInfos] =
newMessageInfos;
- const threadID = firstNewMessageInfo.threadID;
+ const { threadID } = firstNewMessageInfo;
const threadInfo = threadInfos[threadID];
const updateBadge = threadInfo.currentUser.subscription.home;
@@ -136,8 +136,11 @@
username &&
threadInfo.currentUser.role &&
oldValidUsernameRegex.test(username) &&
- firstNewMessageInfo.type === messageTypes.TEXT &&
- isMentioned(username, firstNewMessageInfo.text);
+ newMessageInfos.some(
+ newMessageInfo =>
+ newMessageInfo.type === messageTypes.TEXT &&
+ isMentioned(username, newMessageInfo.text),
+ );
if (!updateBadge && !displayBanner && !userWasMentioned) {
continue;
}

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 12:35 AM (18 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693040
Default Alt Text
D6866.diff (1011 B)

Event Timeline