Page MenuHomePhabricator

Implement peer notifications session creation as outbound on web and add notifs outbound session creator to OlmAPI
ClosedPublic

Authored by marcin on Jul 4 2024, 9:23 AM.
Tags
None
Referenced Files
F3181577: D12669.id42727.diff
Fri, Nov 8, 6:31 AM
Unknown Object (File)
Tue, Oct 22, 7:03 PM
Unknown Object (File)
Mon, Oct 14, 8:23 PM
Unknown Object (File)
Mon, Oct 14, 8:23 PM
Unknown Object (File)
Mon, Oct 14, 8:23 PM
Unknown Object (File)
Mon, Oct 14, 8:23 PM
Unknown Object (File)
Mon, Oct 14, 8:23 PM
Unknown Object (File)
Mon, Oct 14, 8:22 PM
Subscribers

Details

Summary

This differential implements outbound notifications session creation on web. It also adds this functionality to OlmAPI so that code in lib can create notifs sessions

Test Plan

Tested in D12673

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin requested review of this revision.Jul 4 2024, 9:39 AM
tomek added inline comments.
lib/types/crypto-types.js
178 ↗(On Diff #42039)

Why do we need the content keys?

web/push-notif/notif-crypto-utils.js
441 ↗(On Diff #42039)

Should we mention something about notifs in this name?

This revision is now accepted and ready to land.Jul 8 2024, 4:12 AM
lib/types/crypto-types.js
178 ↗(On Diff #42039)

We need deviceID and deviceID is the ed25519 part of contentInboundKeys.

web/push-notif/notif-crypto-utils.js
441 ↗(On Diff #42039)

I don't think it is necessary since we only store notifs data in IndexedDB.

kamil added a subscriber: kamil.
kamil added inline comments.
lib/types/crypto-types.js
170–180 ↗(On Diff #42039)

It's a bit unclear what are differences between these two and which one to use when needed - can we somehow improve naming?

178 ↗(On Diff #42039)

that being said I think it's better to just pass deviceID, but up to you