Merge pull request #9026 from overleaf/msm-removed-chat-angular-event

[web] Remove legacy `Chat.MessageReceived` event

GitOrigin-RevId: 60a11a57529cd366bab2b630b8cfe31f6a41a1c3
This commit is contained in:
ilkin-overleaf 2022-08-05 12:04:09 +03:00 committed by Copybot
parent c331e7c73b
commit 74d14ba295

View file

@ -223,11 +223,6 @@ export function ChatProvider({ children }) {
if (message.clientId === clientId) return
dispatch({ type: 'RECEIVE_MESSAGE', message })
// Temporary workaround to pass state to unread message balloon in Angular
window.dispatchEvent(
new CustomEvent('Chat.MessageReceived', { detail: { message } })
)
}
socket.on('new-chat-message', receivedMessage)