feature/IO-2972-Final-Redis-Sockets-Fixes - Cleanup
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user