-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib] Propagate thread infos to the notifs generating code
Summary: When a user performs an action, we generate an operation that is used to update Redux, send DM messages, and send the notifs. Updating Redux happens first. Generating notifs requires access to the thread. These cause a problem when leaving a thread, which might result in the thread being deleted from the store, making us unable to send the notifs. Notif sending code needs threads for two main reasons: to determine the recipients and to create a notification text. The solution is to pass a thread info inside notifs creation data so that we can use it instead of selecting from the store. https://linear.app/comm/issue/ENG-9823/fix-sending-notifs-about-leaving-a-thick-thread Depends on D13845 Test Plan: Created a thick thread with three users and verified that added users receive a thread, a message, and a notif about thread creation. Left this thread as one of the users and checked that an exception isn't thrown. The notif wasn't generated because `leaveThreadMessageSpec` doesn't implement `generatesNotifs` function. Added the user to the thread, which also doesn't generate notif for the same reason. Sending a text message to that thread generated the notifs. Reviewers: kamil, angelika Reviewed By: kamil Subscribers: ashoat Differential Revision: https://phab.comm.dev/D13848
- Loading branch information
Showing
18 changed files
with
142 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.