Page MenuHomePhabricator

[keyserver] convert existing logic for building userPushInfoPromises to an async function called generateNotifUserInfoPromise
ClosedPublic

Authored by ginsu on Feb 21 2023, 10:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 9:06 AM
Unknown Object (File)
Thu, Dec 19, 9:02 AM
Unknown Object (File)
Thu, Dec 19, 8:58 AM
Unknown Object (File)
Thu, Dec 19, 8:56 AM
Unknown Object (File)
Thu, Dec 19, 8:53 AM
Unknown Object (File)
Thu, Dec 19, 7:58 AM
Unknown Object (File)
Thu, Dec 19, 6:14 AM
Unknown Object (File)
Sat, Dec 7, 6:44 AM
Subscribers

Details

Summary

The logic for building userPushInfoPromise will be really simlar when we build userRescindInfoPromise so I built generateNotifUserInfoPromise to reuse this logic in a subseqent diff


Depends on D6307
Linear Task: ENG-2644

Test Plan

flow and please see video showing no regressions with the notifications.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat requested changes to this revision.Feb 22 2023, 11:09 AM
ashoat added inline comments.
keyserver/src/creators/message-creator.js
428

Why isn't this an async function? If you're returning a Promise, you should pretty much always use await / async

This revision now requires changes to proceed.Feb 22 2023, 11:09 AM

address ashoat's comments

ashoat requested changes to this revision.Feb 23 2023, 12:02 PM

You need to do more than just add async. I don't think you have a full understanding of async/await here

This revision now requires changes to proceed.Feb 23 2023, 12:02 PM

address ashoat's comments

ginsu retitled this revision from [keyserver] convert existing logic for building userPushInfoPromises to an IIFE called generateNotifUserInfoPromise to [keyserver] convert existing logic for building userPushInfoPromises to an async function called generateNotifUserInfoPromise.Feb 24 2023, 4:55 PM
ashoat removed 1 blocking reviewer(s): atul.
This revision is now accepted and ready to land.Feb 26 2023, 5:38 AM