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
F3342026: D12669.id43072.diff
Fri, Nov 22, 12:17 AM
F3339586: D12669.diff
Thu, Nov 21, 8:18 PM
F3335787: D12669.id43072.diff
Thu, Nov 21, 10:49 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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