Page MenuHomePhabricator

[web/native/lib] Combine openSocketSelector from web and native
ClosedPublic

Authored by michal on Dec 12 2023, 3:47 AM.
Tags
None
Referenced Files
F2906681: D10309.diff
Sun, Oct 6, 9:51 AM
Unknown Object (File)
Thu, Oct 3, 8:30 AM
Unknown Object (File)
Tue, Sep 17, 7:35 AM
Unknown Object (File)
Tue, Sep 17, 7:35 AM
Unknown Object (File)
Tue, Sep 17, 7:35 AM
Unknown Object (File)
Tue, Sep 17, 7:34 AM
Unknown Object (File)
Tue, Sep 17, 7:34 AM
Unknown Object (File)
Aug 8 2024, 5:42 AM
Subscribers

Details

Summary

ENG-6043

Should have been done when web cookies were migrated to redux, but I haven't noticed this code then. Now that cookies are in redux on all platforms we can merge these two functions.

Test Plan

Tested that web app still works fine (logging in, out, navigation, sending messages). It's hard to test the of cookie change restarts the websocket because web can't really recover from cookies changes and it just causes a logout.

Diff Detail

Repository
rCOMM Comm
Branch
michal/eng-6043
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
lib/selectors/socket-selectors.js
37–42 ↗(On Diff #34525)

This behavior wasn't present on the web and now we're introducing it. Is it a good idea to do so?

This revision is now accepted and ready to land.Dec 13 2023, 4:51 AM
lib/selectors/socket-selectors.js
37–42 ↗(On Diff #34525)

I can't think of a situation where we wouldn't want this behaviour. If the cookie changes we should update the websocket connection so everything is in sync. Now that cookies on web are in redux we should try and treat it uniformly.