Page MenuHomePhabricator

Create new olm session during invalidated cookie resolution
ClosedPublic

Authored by marcin on May 17 2023, 5:15 AM.
Tags
None
Referenced Files
F1668012: D7853.id26753.diff
Fri, Apr 26, 2:56 PM
Unknown Object (File)
Mon, Apr 15, 3:56 PM
Unknown Object (File)
Mon, Apr 15, 3:55 PM
Unknown Object (File)
Mon, Apr 15, 3:48 PM
Unknown Object (File)
Mon, Apr 15, 3:40 PM
Unknown Object (File)
Mon, Apr 15, 5:50 AM
Unknown Object (File)
Mon, Apr 15, 1:04 AM
Unknown Object (File)
Mon, Apr 15, 12:57 AM
Subscribers

Details

Summary

This differential implements new olm session establishment on native during invalidated cookie resolution.

Test Plan
  1. Go to the socket.react.js file in lib.
  2. Inside a function initializeSocket throw an error under await this.sendInitialMessage();.
  3. Change this.failuresAfterPolicyAcknowledgment >= 2 condition to this.failuresAfterPolicyAcknowledgment >= 0.

Now we will be repeatbedly calling socketCrashLoopRecivery() which calls resolveInvalidatedCookie.

  1. In regular intervals issue select * from olm_sessions; query. Ensure new entries appear in the database.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rebase to update commit message

native/account/resolve-invalidated-cookie.js
19 ↗(On Diff #26608)

Accidental console.log was left here

tomek added inline comments.
lib/socket/socket.react.js
108 ↗(On Diff #26608)
native/account/logged-out-modal.react.js
785–802 ↗(On Diff #26608)

Rename?

This revision is now accepted and ready to land.May 22 2023, 2:00 AM

Rename call to get and rebaew before landing

This revision is now accepted and ready to land.May 31 2023, 8:37 AM