HomePhabricator
Diffusion Comm c6b1eecb5b5b

[web/native] Add lastCommunicatedPlatformDetails to redux

Description

[web/native] Add lastCommunicatedPlatformDetails to redux

Summary:
https://linear.app/comm/issue/ENG-3905/platform-details-arent-updated-on-http-communication

Currently platform details are only send on web socket intialization and login. This is a problem because before the websocket is connected the client can already communicate with the keyserver with http endpoints. This diff adds lastCommunicatedPlatformDetails to redux which will keep track of the last send platform details, so we can resend them if they change. We track this as map of urlPrefix -> PlatformDetails, in preparation for multi keyservers.

NOTE: for some reason flow throws an error in a few places after adding the new action. To fix this I've added a few no-op casts (the types that I'm casting to, are the types flow infered for these values already).

Test Plan: Test if redux is updated on login. Test if the action works with the next diff

Reviewers: kamil, tomek

Reviewed By: kamil

Subscribers: inka, ashoat

Differential Revision: https://phab.comm.dev/D8350