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
F1722188: D7853.id27214.diff
Thu, May 9, 7:38 PM
F1721998: D7853.id26607.diff
Thu, May 9, 5:24 PM
F1721765: D7853.id27175.diff
Thu, May 9, 4:44 PM
Unknown Object (File)
Mon, May 6, 2:07 PM
Unknown Object (File)
Mon, May 6, 8:28 AM
Unknown Object (File)
Mon, May 6, 4:34 AM
Unknown Object (File)
Sat, May 4, 1:27 PM
Unknown Object (File)
Fri, May 3, 11:10 PM
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
No Lint Coverage
Unit
No Test Coverage

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