Page MenuHomePhabricator

[lib] add `deviceID` prop to Tunnelbroker's `MessageProcessed`
ClosedPublic

Authored by kamil on May 16 2024, 9:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 19, 4:39 PM
Unknown Object (File)
Wed, Jun 19, 9:49 AM
Unknown Object (File)
Wed, Jun 19, 9:45 AM
Unknown Object (File)
Wed, Jun 19, 9:12 AM
Unknown Object (File)
Tue, Jun 11, 5:00 AM
Unknown Object (File)
Tue, Jun 11, 4:57 AM
Unknown Object (File)
Mon, Jun 10, 10:36 AM
Unknown Object (File)
Sat, Jun 8, 4:41 AM
Subscribers

Details

Summary

This is needed to remove processed message form OutboundP2PMessage's table.

Depends on D12076

Test Plan

Test sending confirmation, use app for a while to make sure this not interfere with processing store ops (login/logout).

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.May 16 2024, 9:39 AM
lib/handlers/db-ops-handler.react.js
51 ↗(On Diff #40294)

Open question:
Does calling identityContext.getAuthMetadata() has any advantages over fetching deviceID from Olm using getContentSigningKey() from lib/utils/crypto-utils.js?

lib/handlers/db-ops-handler.react.js
51 ↗(On Diff #40294)

Overall yes, getAuthMetadata caches values and on native is subscribed to the emitter which means is reactive to changes of accessToken.

But looking at implementation, for only deviceID is doesn't really matter which method we'll use, this is more about readability. I am open to updating this to use getContentSigningKey(). (cc. @tomek)

bartek added inline comments.
lib/handlers/db-ops-handler.react.js
51 ↗(On Diff #40294)

Yeah I'm talking specifically about deviceID.

This revision is now accepted and ready to land.May 20 2024, 1:52 AM
lib/handlers/db-ops-handler.react.js
51 ↗(On Diff #40294)

I updated getContentSigningKey and created ENG-8192 to discuss some improvements.