should fix it
parent
4297fd5916
commit
e175334757
|
@ -878,7 +878,12 @@ function handleSwitchToPad(client, message)
|
||||||
// clear the session and leave the room
|
// clear the session and leave the room
|
||||||
var currentSession = sessioninfos[client.id];
|
var currentSession = sessioninfos[client.id];
|
||||||
var padId = currentSession.padId;
|
var padId = currentSession.padId;
|
||||||
var roomClients = socketio.sockets.clients(padId);
|
var roomClients = [], room = socketio.sockets.adapter.rooms[padId];
|
||||||
|
if (room) {
|
||||||
|
for (var id in room) {
|
||||||
|
roomClients.push(socketio.sockets.adapter.nsp.connected[id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
for(var i = 0; i < roomClients.length; i++) {
|
for(var i = 0; i < roomClients.length; i++) {
|
||||||
var sinfo = sessioninfos[roomClients[i].id];
|
var sinfo = sessioninfos[roomClients[i].id];
|
||||||
if(sinfo && sinfo.author == currentSession.author) {
|
if(sinfo && sinfo.author == currentSession.author) {
|
||||||
|
|
Loading…
Reference in New Issue