Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/push/send.js
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | newMessageInfos.some(newMessageInfo => { | ||||
const unwrappedMessageInfo = | const unwrappedMessageInfo = | ||||
newMessageInfo.type === messageTypes.SIDEBAR_SOURCE | newMessageInfo.type === messageTypes.SIDEBAR_SOURCE | ||||
? newMessageInfo.sourceMessage | ? newMessageInfo.sourceMessage | ||||
: newMessageInfo; | : newMessageInfo; | ||||
return ( | return ( | ||||
unwrappedMessageInfo.type === messageTypes.TEXT && | unwrappedMessageInfo.type === messageTypes.TEXT && | ||||
(isUserMentioned(username, unwrappedMessageInfo.text) || | (isUserMentioned(username, unwrappedMessageInfo.text) || | ||||
(resolvedUsername && | (resolvedUsername && | ||||
isUserMentioned(resolvedUsername, unwrappedMessageInfo.text))) | isUserMentioned(resolvedUsername, unwrappedMessageInfo.text)) || | ||||
userID !== unwrappedMessageInfo.creator.id) | |||||
); | ); | ||||
}); | }); | ||||
if (!updateBadge && !displayBanner && !userWasMentioned) { | if (!updateBadge && !displayBanner && !userWasMentioned) { | ||||
return null; | return null; | ||||
} | } | ||||
const badgeOnly = !displayBanner && !userWasMentioned; | const badgeOnly = !displayBanner && !userWasMentioned; | ||||
const notifTargetUserInfo = { id: userID, username }; | const notifTargetUserInfo = { id: userID, username }; | ||||
▲ Show 20 Lines • Show All 1,554 Lines • Show Last 20 Lines |