Skip to content

Commit

Permalink
FIX ensure notifications are not sent back to the author of the messa…
Browse files Browse the repository at this point in the history
…ge, unless they mention themselves
  • Loading branch information
twrichards committed Aug 9, 2022
1 parent 7bb9161 commit a5d57d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notifications-lambda/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export const handler = async (event: DynamoDBStreamEvent) => {
// TODO: Include more scenarios that trigger desktop notification
(item) =>
isUserMentioned(item, user) ||
doesUserManuallyHavePinboardOpen(item, user)
(item.userEmail !== user.email && // ensure we don't notify the person who sent the message
doesUserManuallyHavePinboardOpen(item, user))
)
.map((item) =>
webPush
Expand Down

0 comments on commit a5d57d5

Please sign in to comment.