Page MenuHomePhabricator

[web] Send platform details on websocket connection
ClosedPublic

Authored by michal on May 17 2023, 5:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 1:04 PM
Unknown Object (File)
Mon, Apr 22, 1:04 PM
Unknown Object (File)
Mon, Apr 22, 1:03 PM
Unknown Object (File)
Mon, Apr 22, 1:00 PM
Unknown Object (File)
Mar 3 2024, 2:27 AM
Unknown Object (File)
Mar 3 2024, 2:27 AM
Unknown Object (File)
Mar 2 2024, 9:19 PM
Unknown Object (File)
Mar 2 2024, 9:19 PM
Subscribers

Details

Summary

Now it makes sense to send it on websocket connection to update the server on the web app version.

Depends on D7854

Test Plan

Run production version of the web app so there's no hot reloading.

  • run the web app, check the db cookie table if it has no version
  • update registerConfig in app.react.js to contain platformDetails with the version
  • reload the web app, check if there's new version in the db

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

keyserver/src/socket/socket.js
469–478 ↗(On Diff #26619)

This was added to update the platform of the desktop apps from web to macos/windows. It will be better handled by sending the platform details during web socket initialization.

tomek requested changes to this revision.May 19 2023, 1:32 AM
tomek added inline comments.
keyserver/src/socket/socket.js
469–478 ↗(On Diff #26619)

Does it require adding some code instead of this one? Or just removing it and modifying the initialPlatformDetailsSent condition does the job?

This revision now requires changes to proceed.May 19 2023, 1:32 AM
michal added inline comments.
keyserver/src/socket/socket.js
469–478 ↗(On Diff #26619)

initialPlatformDetailsSent is enough (this is probably how I should have done this from the beginning).

The previous flow looked like this: client sends initialization -> server responds with request from platform details (if electron) -> client responds with platform details

Now every client will just include platform details in the initialization message.

This revision is now accepted and ready to land.May 19 2023, 5:41 AM