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
F3398646: D7853.id27350.diff
Sun, Dec 1, 11:51 PM
F3398515: D7853.id27175.diff
Sun, Dec 1, 11:16 PM
F3398443: D7853.id27343.diff
Sun, Dec 1, 11:01 PM
F3398388: D7853.id26753.diff
Sun, Dec 1, 10:40 PM
F3395930: D7853.diff
Sun, Dec 1, 9:09 AM
Unknown Object (File)
Sat, Nov 16, 7:52 AM
Unknown Object (File)
Sat, Nov 16, 5:57 AM
Unknown Object (File)
Sat, Nov 16, 5:55 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