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)
Sat, Dec 7, 6:44 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:22 AM
Unknown Object (File)
Fri, Nov 22, 1:21 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