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 @@ -238,6 +238,13 @@ const updateBadge = threadInfo.currentUser.subscription.home; const displayBanner = threadInfo.currentUser.subscription.pushNotifs; const username = userInfos[userID] && userInfos[userID].username; + + let resolvedUsername; + if (getENSNames) { + const userInfosWithENSNames = await getENSNames([userInfos[userID]]); + resolvedUsername = userInfosWithENSNames[0].username; + } + const userWasMentioned = username && threadInfo.currentUser.role && @@ -249,7 +256,9 @@ : newMessageInfo; return ( unwrappedMessageInfo.type === messageTypes.TEXT && - isUserMentioned(username, unwrappedMessageInfo.text) + (isUserMentioned(username, unwrappedMessageInfo.text) || + (resolvedUsername && + isUserMentioned(resolvedUsername, unwrappedMessageInfo.text))) ); }); if (!updateBadge && !displayBanner && !userWasMentioned) {