mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
PadMessageHandler: Delete unnecessary protocolVersion
We can assume that the client code is always in sync with what the server expects.
This commit is contained in:
parent
ce730b0493
commit
d36a37d666
5 changed files with 0 additions and 20 deletions
|
@ -813,17 +813,6 @@ const handleClientReady = async (socket, message, authorID) => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!message.protocolVersion) {
|
||||
messageLogger.warn('Dropped message, CLIENT_READY Message has no protocolVersion!');
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.protocolVersion !== 2) {
|
||||
messageLogger.warn('Dropped message, CLIENT_READY Message has a unknown protocolVersion ' +
|
||||
`'${message.protocolVersion}'!`);
|
||||
return;
|
||||
}
|
||||
|
||||
await hooks.aCallAll('clientReady', message);
|
||||
|
||||
// Get ro/rw id:s
|
||||
|
|
|
@ -69,10 +69,6 @@ exports.setSocketIO = (_io) => {
|
|||
}
|
||||
|
||||
socket.on('message', (message, ack = () => {}) => {
|
||||
if (message.protocolVersion && message.protocolVersion !== 2) {
|
||||
logger.warn(`Protocolversion header is not correct: ${JSON.stringify(message)}`);
|
||||
return;
|
||||
}
|
||||
if (!message.component || !components[message.component]) {
|
||||
logger.error(`Can't route the message: ${JSON.stringify(message)}`);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue