[x] EventRepository: Check if WebSocket buffer for incoming messages can be replaced
[ ] PromiseQueue: Check if buffer/queue for outgoing messages can be replaced
[ ] Remove WebSocketService in webapp (and use API Client)
[x] Remove BackendClient
Make MessageBuilder stateless
[ ] Remove apiClient & assetService members
[ ] Make create... functions in MessageBuilder static
[ ] Pass user id to create... functions as parameter
[ ] Pass responses from assetService.upload as params (to avoid actual upload in builder functions)
Replace Protobuf imports in webapp
[ ] Check for all occurences of @wireapp/protocol-messaging and reduce them
[ ] Replace functions that use PROTO_MESSAGE_TYPE (like AssetRepository.buildProtoAsset)
[ ] Be careful with functions that use GENERIC_MESSAGE_TYPE because they might need Cryptobox-specific data and will be migrated in a separate step
[ ] Extend MessageBuilder as needed to support audio messages, etc. (use shims for APIs like AudioContext which exist in browsers but not on Node.js)
Handle clients in the core
[ ] let the core store clients in the database
[ ] add a simple API to access clients from the Account instance:
[ ] verifyClient(userId, clientId) > update the client as validated by the user
[ ] getClients(userId) > get all the clients for a user (will do a fetch against the backend to get the freshest clients). Mostly for viewing in the UI, not for sending messages
[ ] deleteSelfClent(cliendId) > when the user deletes one of his own clients
[ ] getLocalClient() > used in the preference>account page
[ ] fire the logout event when the local client is being removed from another device
[ ] areUsersVerified(userIds) > to check if a conversation with some users is verified (please find a better naming)
[ ] ... (other usages in the webapp not yet identified)
[ ] cache/store clients inside the core for message sending (given some user ids we want to send a message to, the core can match clients internally and encrypt the payloads)
[ ] Update internal clients when a mismatch happens (add/remove clients)
[ ] compute conversation verification/degraded state when a verified user has a new device after a mismatch
[ ] add a hook to warn the webapp when a conversation is degraded/verified
Let the core decrypt messages
[ ] By using the account.on(payloadtype) event listeners we will get the decrypted messages right out from the core (and we can should be able to completely remove the CryptographyRepository from the webapp) (needs https://github.com/wireapp/wire-web-packages/pull/4168 to handle non federated backends)
Replace Cryptography Repository (to be defined later)