Delete dead SERVER_MESSAGE and guest handling code

None of this code seems to be reachable. Hopefully no plugins expect
it to exist.
This commit is contained in:
Richard Hansen 2020-12-18 02:31:08 -05:00 committed by John McLear
parent 794dfb1863
commit 7e50fc2ab5
7 changed files with 11 additions and 242 deletions

View file

@ -72,7 +72,6 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
onClientMessage() {},
onInternalAction() {},
onConnectionTrouble() {},
onServerMessage() {},
};
if (browser.firefox) {
// Prevent "escape" from taking effect and canceling a comet connection;
@ -392,8 +391,6 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
// there are less than 100 messages or we reached the top
if (chat.historyPointer <= 0) { $('#chatloadmessagesbutton').css('display', 'none'); } else // there are still more messages, re-show the load-button
{ $('#chatloadmessagesbutton').css('display', 'block'); }
} else if (msg.type == 'SERVER_MESSAGE') {
callbacks.onServerMessage(msg.payload);
}
// HACKISH: User messages do not have "payload" but "userInfo", so that all "handleClientMessage_USER_" hooks would work, populate payload
@ -586,9 +583,6 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
setOnConnectionTrouble(cb) {
callbacks.onConnectionTrouble = cb;
},
setOnServerMessage(cb) {
callbacks.onServerMessage = cb;
},
updateUserInfo: defer(updateUserInfo),
handleMessageFromServer,
getConnectedUsers,