mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Changing behavior of the same user on a pad. Kick old sessions instead of refusing new
This commit is contained in:
parent
bf32c18d8d
commit
b692ffec0b
2 changed files with 18 additions and 30 deletions
|
@ -520,15 +520,14 @@ function handleClientReady(client, message)
|
|||
},
|
||||
function(callback)
|
||||
{
|
||||
//Check if this author is already on the pad, if yes, kick him!
|
||||
//Check if this author is already on the pad, if yes, kick the other sessions!
|
||||
if(pad2sessions[message.padId])
|
||||
{
|
||||
for(var i in pad2sessions[message.padId])
|
||||
{
|
||||
if(sessioninfos[pad2sessions[message.padId][i]].author == author)
|
||||
{
|
||||
client.send({disconnect:"doublelogin"});
|
||||
return;
|
||||
socketio.clients[pad2sessions[message.padId][i]].send({disconnect:"doublelogin"});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue