HomePhabricator
Diffusion Comm d44f1223581a

[keyserver] Extract sendPushNotif

Description

[keyserver] Extract sendPushNotif

Summary:
In D6935 I made a mistake by awaiting inside a loop. In order to await the notifTextsForMessageInfo in parallel, I'm going to extract the code inside the loop into its own async function.

The name sendPushNotif isn't exactly accurate, in the sense that it sends multiple... but sendPushNotifs is already the name of its caller. One alternative I considered was sendPushNotifsForMessage, but that's also slightly inaccurate because there might be multiple new messages. Open to alternatives (or votes for the latter name).

Test Plan:

  1. In the local dev environment I can test iOS & Android notifs. I tested creating a single message that generates notifs for both iOS and Android
  2. Flow

Reviewers: michal, marcin, tomek

Reviewed By: tomek

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

Details

Provenance
ashoatAuthored on Sep 12 2023, 6:08 PM
Reviewer
tomek
Differential Revision
D9175: [keyserver] Extract sendPushNotif
Parents
rCOMM00dd73623778: [native] update action types and reducer for setting comm access token
Branches
Unknown
Tags
Unknown