feature/IO-3096-GlobalNotifications - Checkpoint, socket to email to bodyshop mapping.
This commit is contained in:
@@ -17,7 +17,7 @@ const useSocket = (bodyshop) => {
|
||||
const socketInstance = SocketIO(endpoint, {
|
||||
path: "/wss",
|
||||
withCredentials: true,
|
||||
auth: { token },
|
||||
auth: { token, bodyshopId: bodyshop.id },
|
||||
reconnectionAttempts: Infinity,
|
||||
reconnectionDelay: 2000,
|
||||
reconnectionDelayMax: 10000
|
||||
@@ -95,7 +95,7 @@ const useSocket = (bodyshop) => {
|
||||
|
||||
if (socketRef.current) {
|
||||
// Update token if socket exists
|
||||
socketRef.current.emit("update-token", token);
|
||||
socketRef.current.emit("update-token", { token, bodyshopId: bodyshop.id });
|
||||
} else {
|
||||
// Initialize socket if not already connected
|
||||
initializeSocket(token);
|
||||
|
||||
Reference in New Issue
Block a user