Checking if the author for the sessions match instead of comparing the entire session.
parent
7861cae763
commit
25f6c9bf9a
|
@ -871,7 +871,7 @@ function handleSwitchToPad(client, message)
|
|||
var roomClients = socketio.sockets.clients(padId);
|
||||
for(var i = 0; i < roomClients.length; i++) {
|
||||
var sinfo = sessioninfos[roomClients[i].id];
|
||||
if(sinfo && sinfo == currentSession) {
|
||||
if(sinfo && sinfo.author == currentSession.author) {
|
||||
// fix user's counter, works on page refresh or if user closes browser window and then rejoins
|
||||
sessioninfos[roomClients[i].id] = {};
|
||||
roomClients[i].leave(padId);
|
||||
|
|
Loading…
Reference in New Issue