feat(utilities): fixed redis-remote-join

This commit is contained in:
Taha Yassine Kraiem 2022-02-23 14:18:12 +01:00
parent af2feb9476
commit 108452d05c

View file

@ -222,7 +222,7 @@ module.exports = {
debug && console.log(`notifying new agent about no SESSIONS`);
io.to(socket.id).emit(NO_SESSIONS);
}
io.adapter.remoteJoin(socket.peerId);
await io.of('/').adapter.remoteJoin(socket.id, socket.peerId);
let rooms = await io.of('/').adapter.allRooms();
if (rooms.has(socket.peerId)) {
let connectedSockets = await io.in(socket.peerId).fetchSockets();