Page MenuHomePhabricator

[lib/keyserver] convert generatesNotif to return a enum
ClosedPublic

Authored by ginsu on Jan 11 2023, 12:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 26, 6:30 AM
Unknown Object (File)
Sun, Jan 26, 6:30 AM
Unknown Object (File)
Sun, Jan 26, 6:30 AM
Unknown Object (File)
Sun, Jan 26, 6:30 AM
Unknown Object (File)
Sun, Jan 26, 6:30 AM
Unknown Object (File)
Sun, Jan 26, 6:29 AM
Unknown Object (File)
Jan 10 2025, 7:27 PM
Unknown Object (File)
Dec 15 2024, 1:46 PM
Subscribers

Details

Summary

convert generatesNotif to return a enum, either NOTIF or RESCIND, or undefined if the message type should not send a push notif.


Linear Task: ENG-2644

Test Plan

flow also tested chat creation, message creation, message liking/unliking, and adding members to a chat

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu added reviewers: ashoat, tomek.
ashoat requested changes to this revision.EditedJan 11 2023, 12:57 PM

I think it would be good to update message-creator.js in this diff, so doesGenerateNotif ? messageInfo : undefined checks if it's pushTypes.NOTIF specifically. As of this revision, returning RESCIND would result in a new push notif being sent, which seems unexpected

This revision now requires changes to proceed.Jan 11 2023, 12:57 PM

address ashoat's comments

ginsu retitled this revision from [lib] convert generatesNotif to return a enum to [lib/keyserver] convert generatesNotif to return a enum.Jan 11 2023, 4:10 PM

Please address comment before landing

keyserver/src/creators/message-creator.js
400 ↗(On Diff #20832)

We don't need the start of this

This revision is now accepted and ready to land.Jan 11 2023, 6:53 PM

address ashoat's comments