Page MenuHomePhabricator

[lib] create a hook to check if device is primary
ClosedPublic

Authored by kamil on Wed, Nov 27, 9:30 AM.
Tags
None
Referenced Files
F3398606: D14058.id46100.diff
Sun, Dec 1, 11:36 PM
Unknown Object (File)
Sun, Dec 1, 7:07 AM
Unknown Object (File)
Sat, Nov 30, 4:47 PM
Unknown Object (File)
Sat, Nov 30, 1:37 PM
Unknown Object (File)
Wed, Nov 27, 3:22 PM
Unknown Object (File)
Wed, Nov 27, 3:22 PM
Unknown Object (File)
Wed, Nov 27, 3:22 PM
Unknown Object (File)
Wed, Nov 27, 3:22 PM
Subscribers

Details

Summary

The fact that this is asynchronous is painful but this is caused by ENG-8192.

Creatin hook to avoid code duplication

Test Plan

Log result and check if this works on primary and non-primary

Diff Detail

Repository
rCOMM Comm
Branch
backup-2
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Wed, Nov 27, 10:17 AM
kamil edited the summary of this revision. (Show Details)
bartek added inline comments.
lib/hooks/primary-device-hooks.js
22

Alternatively, you can use await getContentSigningKey() from lib/utils/crypto-utils.js to get just deviceID and avoid relying on Identity context

This revision is now accepted and ready to land.Fri, Nov 29, 3:16 AM
lib/hooks/primary-device-hooks.js
22

It's basically the same, but I prefer using getAuthMetadata() as this is what we use a lot more in the codebase. Overall, we should aim to get ENG-8192 done as a future solution.