Page MenuHomePhabricator

[lib] rename PrimaryDeviceLogout -> DeviceLogout
ClosedPublic

Authored by varun on Aug 9 2024, 1:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 3:19 AM
Unknown Object (File)
Mon, Dec 16, 3:19 AM
Unknown Object (File)
Mon, Dec 16, 3:19 AM
Unknown Object (File)
Mon, Dec 16, 3:19 AM
Unknown Object (File)
Sun, Nov 24, 12:10 PM
Unknown Object (File)
Nov 21 2024, 10:29 AM
Unknown Object (File)
Nov 21 2024, 6:49 AM
Unknown Object (File)
Nov 21 2024, 6:28 AM
Subscribers

Details

Summary

we plan to reuse this message for both primary device logout and logging out a single secondary device from the primary device.

Depends on D13037

Test Plan

Rename so just ran flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Aug 9 2024, 1:18 PM

Just two questions, will let @bartek accept as I don't have context on this decision.

Would appreciate answer to two questions:

  1. Can you explain why we want to reuse this message for those two separate use cases, intead of having two separate ones?
  2. I'm a bit worried about changing the values in userActionsP2PMessageTypes... seeing it checked by a validator makes me wonder if this will introduce version compatibility issues. Can you explain why that's safe here? I'm guessing it wouldn't be safe after we launch this work, but perhaps it's not being used in production yet.
bartek added a subscriber: ashoat.
  1. Can you explain why we want to reuse this message for those two separate use cases, intead of having two separate ones?

This message is sent by the primary device to inform a secondary device that it should visually log out. In the "primary device logout" protocol, it's sent to all secondary devices. In the scenario implemented by this stack, it's sent to just only one device. But it has exactly the same meaning for the recipient. I mentioned this and suggested the rename in this comment.

  1. I'm a bit worried about changing the values in userActionsP2PMessageTypes... seeing it checked by a validator makes me wonder if this will introduce version compatibility issues. Can you explain why that's safe here? I'm guessing it wouldn't be safe after we launch this work, but perhaps it's not being used in production yet.

Good point. I guess you're right: we're not using this code in prod yet: its existing usage for primary device logout is hidden behind the isDev flag.

This revision is now accepted and ready to land.Aug 13 2024, 1:47 AM

Good point. I guess you're right: we're not using this code in prod yet: its existing usage for primary device logout is hidden behind the isDev flag.

that's right