Changeset View
Standalone View
lib/types/tunnelbroker-messages.js
- This file was added.
// @flow | |||||||||
export type SessionRequestMessage = { | |||||||||
ashoat: Is this message meant to initialize a Tunnelbroker connection? If so, maybe… | |||||||||
atulUnsubmitted Done Inline Actions(unsolicited and not my part of the codebase, but would prefer ConnectionInitializationMessage so I could eg fuzzy search "connec" and it would still come up) atul: (unsolicited and not my part of the codebase, but would prefer… | |||||||||
ashoatUnsubmitted Done Inline ActionsAlso could be good to prefix with TB ashoat: Also could be good to prefix with `TB` | |||||||||
jonAuthorUnsubmitted Done Inline ActionsYes, it is used to establish a session. Websocket protocol already "takes care of" the connection aspect, so I would like to avoid that term. However, I would rather have consistency than accuracy. This name was chosen to reflect the existing messages on the tunnelbroker side. https://github.com/CommE2E/comm/blob/4bbb90307487a584e6a41b768ec78b116c502fa1/shared/tunnelbroker_messages/src/messages/session.rs#L33-L41 I would just need to rename it in both places. But now would be the time to rename it rather than later. jon: Yes, it is used to establish a session. Websocket protocol already "takes care of" the… | |||||||||
+type: 'sessionRequest', | |||||||||
+deviceId: string, | |||||||||
ashoatUnsubmitted Done Inline Actions
We usually do deviceID instead of deviceId ashoat: We usually do `deviceID` instead of `deviceId` | |||||||||
+accessToken: string, | |||||||||
+notifyToken?: string, | |||||||||
+deviceType: 'mobile' | 'web' | 'keyserver', | |||||||||
+deviceAppVersion?: string, | |||||||||
ashoatUnsubmitted Done Inline ActionsWhat kind of version is this meant to be? ashoat: What kind of version is this meant to be? | |||||||||
jonAuthorUnsubmitted Done Inline ActionsThis is a carry-over of the existing API. I assumed that there may be logic in the future where the types of messages may change depending on what the client supports. I can remove if needed. jon: This is a carry-over of the existing API. I assumed that there may be logic in the future where… | |||||||||
+deviceOs?: string, | |||||||||
ashoatUnsubmitted Done Inline Actions
Is this a version string, or more like ios vs. android? Should this be combined with deviceType in some way? ashoat: Is this a version string, or more like `ios` vs. `android`? Should this be combined with… | |||||||||
jonAuthorUnsubmitted Done Inline ActionsI had assumed that it would be needed for push notifications. But would available by identity service. I think we should remove this. jon: I had assumed that it would be needed for push notifications. But would available by identity… | |||||||||
}; |
Is this message meant to initialize a Tunnelbroker connection? If so, maybe ConnectionInitializationMessage or ConnInitMessage or something like that would be more clear