feature/IO-2972-Final-Redis-Sockets-Fixes - Cleanup

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-10-04 13:52:09 -04:00

View File

@@ -2,7 +2,7 @@ const { admin } = require("../firebase/firebase-handler");
const redisSocketEvents = ({
io,
redisHelpers: { setSessionData, clearSessionData },
redisHelpers: { setSessionData, clearSessionData }, // Note: Used if we persist user to Redis
ioHelpers: { getBodyshopRoom },
logger
}) => {
@@ -21,9 +21,9 @@ const redisSocketEvents = ({
.verifyIdToken(socket.handshake.auth.token)
.then((user) => {
socket.user = user;
return setSessionData(socket.id, "user", user);
})
.then(() => {
// Note: if we ever want to capture user data across sockets
// Uncomment the following line and then remove the next() to a second then()
// return setSessionData(socket.id, "user", user);
next();
})
.catch((error) => {