HomePhabricator
Diffusion Comm af4437e04876

[keyserver] Update sendPushNotif to detect mention for a ENS name

Description

[keyserver] Update sendPushNotif to detect mention for a ENS name

Summary:
We currently bypass notif settings for when a user is @ mentioned, so they will get the notification even if they have backgrounded the chat. Now that we allow users to be @ mentioned by their ENS name, we need to update the conditions for userWasMentioned to detect if a user is mentioned.

This should be a pretty simple change, but I don't have the most context on notifs in general. Here, the idea is we:

  1. Get the resolved ENS name for the raw username provided (if exists)
  2. Instead of just checking if the raw username was mentioned, we should also check if the ENS name was mentioned
  3. If either of the two conditions are true, we consider the user to be mentioned (as opposed to just the raw username being mentioned)

Addressess https://linear.app/comm/issue/ENG-5074/update-sendpushnotif-to-detect-mention-for-a-ens-name

Depends on D10389

Test Plan:
Please see the video below where I backgrounded a chat, then observed that the user got notifs for mentions including both their wallet address and ENS name

Reviewers: atul, ginsu, inka, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10407

Details

Provenance
rohanAuthored on Dec 19 2023, 9:11 AM
Reviewer
ashoat
Differential Revision
D10407: [keyserver] Update sendPushNotif to detect mention for a ENS name
Parents
rCOMM87417b194198: [lib/web/native] Bold ENS names in user mentions
Branches
Unknown
Tags
Unknown