HomePhabricator
Diffusion Comm cfc5daf4fbc4

[lib] don't process persisted inbound messages without `viewerID`

Description

[lib] don't process persisted inbound messages without viewerID

Summary:
ENG-9381.

I had some InboundP2PMessage's in the store, and I discovered that they're causing ignored DMOperation because logged out.
This is a race condition because this component can run before getting loggedInUserInfo in getInitialReduxState and useProcessDMOperation was called without viewerID.

This fixes the issue.

This is also safe for messages not from DB but received from Tunnelbroker, we're going to establish a socket connection only when viewerID is defined anyway.

Test Plan: Seeing the messages processed.

Reviewers: tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D13445

Details

Provenance
kamilAuthored on Sep 24 2024, 3:54 AM
Reviewer
tomek
Differential Revision
D13445: [lib] don't process persisted inbound messages without `viewerID`
Parents
rCOMM109ee3ef4759: [keyserver][lib] Allow skipping createRobotextInThinThread
Branches
Unknown
Tags
Unknown