dm3
dm3 copied to clipboard
DSFE 1 - Query messages from multiple DS
At the moment only messages from the very first delivery are considered. Every other DS is ignored. After implementing this issue all DS that are part of the user profile should be used.
- [ ] Introduce a hook 'useDeliveryService' that encapsulates everything related to dealing with multiple DS. It should handle the authentication and should offer an API for other hooks to seamlessly consume DS-related methods without bothering with underlying authentication etc.
- [ ] The function /packages/lib/profile/src/deliveryServiceProfile/Delivery.ts::getDeliveryServiceClient() can be used to request the list of DS. However, it'll stop as soon as the first request is a success. Develop a function based on this message to make a request to every DS in the list not just the very first. Use this function whenever you want to target all DS.
- [ ] /packages/messenger-widget/src/hooks/auth/DeliveryServiceConnector.ts is used to establish a connection to a DS. This function should be used to login on every DS the userProfile contains within useDeliveryService
- [ ] include useDeliveryService to useConversation and useMessage
- [ ] packages/messenger-widget/src/hooks/webSocket/useWebSocket.tsx handles a WebSocket connection to only one DS. Manage Websocket connections for every DS