mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
a safer approach I think but still be careful
This commit is contained in:
parent
ac9b972358
commit
13ad46aa67
2 changed files with 9 additions and 6 deletions
|
@ -278,8 +278,9 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
if (!getSocket()) return;
|
||||
if (!evt.data) return;
|
||||
var wrapper = evt;
|
||||
if (wrapper.type != "COLLABROOM") return;
|
||||
if (wrapper.type != "COLLABROOM" && wrapper.type != "CUSTOM") return;
|
||||
var msg = wrapper.data;
|
||||
|
||||
if (msg.type == "NEW_CHANGES")
|
||||
{
|
||||
var newRev = msg.newRev;
|
||||
|
@ -390,6 +391,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
|||
callbacks.onUserLeave(userInfo);
|
||||
}
|
||||
}
|
||||
|
||||
else if (msg.type == "DISCONNECT_REASON")
|
||||
{
|
||||
appLevelDisconnectReason = msg.reason;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue