diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 5f7279c86..61b9733b1 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -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 diff --git a/src/node/handler/SocketIORouter.js b/src/node/handler/SocketIORouter.js index 0fa18755e..53bb6d241 100644 --- a/src/node/handler/SocketIORouter.js +++ b/src/node/handler/SocketIORouter.js @@ -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; diff --git a/src/static/js/pad.js b/src/static/js/pad.js index e1c3186fb..66e46391e 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -202,7 +202,6 @@ const sendClientReady = (isReconnect) => { padId, sessionID: Cookies.get('sessionID'), token, - protocolVersion: 2, }; // this is a reconnect, lets tell the server our revisionnumber diff --git a/src/static/js/timeslider.js b/src/static/js/timeslider.js index 2b226aef0..7268f95f0 100644 --- a/src/static/js/timeslider.js +++ b/src/static/js/timeslider.js @@ -102,7 +102,6 @@ const sendSocketMsg = (type, data) => { padId, token, sessionID: Cookies.get('sessionID'), - protocolVersion: 2, }); }; diff --git a/src/tests/backend/specs/socketio.js b/src/tests/backend/specs/socketio.js index 30ef82748..f10f63004 100644 --- a/src/tests/backend/specs/socketio.js +++ b/src/tests/backend/specs/socketio.js @@ -86,7 +86,6 @@ const handshake = async (socket, padID) => { padId: padID, sessionID: null, token: 't.12345', - protocolVersion: 2, }); logger.debug('waiting for CLIENT_VARS response...'); const msg = await getSocketEvent(socket, 'message'); @@ -464,7 +463,6 @@ describe(__filename, function () { let serverSocket; const want = { component: this.test.fullTitle(), - protocolVersion: 2, foo: {bar: 'asdf'}, }; let rx; @@ -482,7 +480,6 @@ describe(__filename, function () { }); const tx = async (socket, message = {}) => await new Promise((resolve, reject) => { - message = Object.assign({protocolVersion: 2}, message); const AckErr = class extends Error { constructor(name, ...args) { super(...args); this.name = name; } };