Page MenuHomePhabricator

[lib] rename PrimaryDeviceLogout -> DeviceLogout
ClosedPublic

Authored by varun on Aug 9 2024, 1:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 10:29 AM
Unknown Object (File)
Thu, Nov 21, 6:49 AM
Unknown Object (File)
Thu, Nov 21, 6:28 AM
Unknown Object (File)
Wed, Nov 13, 12:57 PM
Unknown Object (File)
Wed, Nov 13, 12:57 PM
Unknown Object (File)
Wed, Nov 13, 12:57 PM
Unknown Object (File)
Sat, Nov 9, 7:42 AM
Unknown Object (File)
Fri, Nov 8, 1:11 PM
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
Branch
hackathon (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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