diff --git a/src/common/images/sprites/event-svg-sprite.svg b/src/common/images/sprites/event-svg-sprite.svg index 50864a9e0..b45f6025b 100644 --- a/src/common/images/sprites/event-svg-sprite.svg +++ b/src/common/images/sprites/event-svg-sprite.svg @@ -1 +1 @@ -P \ No newline at end of file +P \ No newline at end of file diff --git a/src/withSocketConnection/useRealTimeImplementation/index.js b/src/withSocketConnection/useRealTimeImplementation/index.js index 158f476df..9814fd12c 100644 --- a/src/withSocketConnection/useRealTimeImplementation/index.js +++ b/src/withSocketConnection/useRealTimeImplementation/index.js @@ -55,7 +55,14 @@ const useRealTimeImplementation = () => { socket.on('connect', () => { store.dispatch({ type: SOCKET_HEALTHY_STATUS }); + const profileId = store.getState().data.selectedUserProfile?.id; + socket.emit('authorization', { type: 'authorization', id: 1, authorization: `Bearer ${store.getState().data.token.access_token}` }); + + if (profileId) { + socket.emit('profile', { profile_id: profileId }); + } + console.log('realtime: connected'); }); socket.on('disconnect', (msg) => {