(1) Use the server to send messages between apps when adding an app. (2) Support notifications for multiple apps in the server.#132
Conversation
…(2) Support notifications for multiple apps in the server.
jkaczman
left a comment
There was a problem hiding this comment.
Thanks! A couple comments from an initial look.
| wifi_password: None, | ||
| }; | ||
|
|
||
| let qr_content = serde_json::to_string(&add_app_secret) |
There was a problem hiding this comment.
It's possible that the two phones may not be on the same relay. There should be some check for this instead of it failing with (what I'm guessing is) a generic fail error. I suppose this would need to be embedded in the QR.
There was a problem hiding this comment.
In regard to what we just discussed on call: it's due to /add_app_check and /add_app_request. If they have different relays, those two endpoints we have for connecting them will just time-out due to no connection.
There was a problem hiding this comment.
Another thought: the new relay design will need something like this in the QR as well because users share a "plan" for a given camera.
There was a problem hiding this comment.
I added this to secluso/mobile_client/#90. The app now checks to make sure both phones are connected to the same relay with the same username.
jkaczman
left a comment
There was a problem hiding this comment.
I also had another question (not related to these changes necessarily, but multi-app in general): we use a ref_counter based on num_apps at the time of uploading an encrypted file. What if num_apps was to be 1 when uploading and then another phone is added before that file is downloaded?
This shouldn't be an issue. When an app is added, the camera sends the MLS epoch value at which the app should start downloading videos. If an encrypted video is uploaded to the server before the new app is added, it will have a num_app of 1 and the new app will not try to download it. If an encrypted video is uploaded after the new app is added, it will have a num_app of 2 and the new will try to download it. |
jkaczman
left a comment
There was a problem hiding this comment.
Looks good. Thank you!
This PR provides the functionality needed to support multiple (mobile_client) apps to use one camera.
fixes secluso/mobile_client#50