feature/IO-3000-messaging-sockets-migration2 - Final Modifications
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -188,19 +188,6 @@ const redisSocketEvents = ({
|
||||
}
|
||||
};
|
||||
|
||||
const messageAdded = ({ bodyshopId, conversationId, message }) => {
|
||||
try {
|
||||
const room = getBodyshopConversationRoom({ bodyshopId, conversationId });
|
||||
io.to(room).emit("new-message", { message, conversationId });
|
||||
} catch (error) {
|
||||
logger.log("Failed to handle new message", "error", "io-redis", null, {
|
||||
error: error.message,
|
||||
stack: error.stack
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
socket.on("message-added", messageAdded);
|
||||
socket.on("conversation-modified", conversationModified);
|
||||
socket.on("join-bodyshop-conversation", joinConversationRoom);
|
||||
socket.on("leave-bodyshop-conversation", leaveConversationRoom);
|
||||
|
||||
Reference in New Issue
Block a user