From b277f3a6ca1c8a9252de77d1964156c8396c0123 Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 10 May 2014 14:30:28 +0100 Subject: [PATCH] Consistent 'connection' rather than 'server' in - part 2 --- client/src/models/gateway.js | 2 +- server/client.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/models/gateway.js b/client/src/models/gateway.js index ab80bcc..3210654 100644 --- a/client/src/models/gateway.js +++ b/client/src/models/gateway.js @@ -297,7 +297,7 @@ _kiwi.model.Gateway = function () { connection_id = _kiwi.app.connections.active_connection.get('connection_id'); var data_buffer = { - server: connection_id, + connection_id: connection_id, data: JSON.stringify(data) }; this.rpc.call('irc', data_buffer, callback); diff --git a/server/client.js b/server/client.js index 1798b38..0d27ddb 100755 --- a/server/client.js +++ b/server/client.js @@ -85,14 +85,14 @@ function handleClientMessage(msg, callback) { server; // Make sure we have a server number specified - if ((msg.server === null) || (typeof msg.server !== 'number')) { + if ((msg.connection_id === null) || (typeof msg.connection_id !== 'number')) { return (typeof callback === 'function') ? callback('server not specified') : undefined; - } else if (!this.state.irc_connections[msg.server]) { + } else if (!this.state.irc_connections[msg.connection_id]) { return (typeof callback === 'function') ? callback('not connected to server') : undefined; } // The server this command is directed to - server = this.state.irc_connections[msg.server]; + server = this.state.irc_connections[msg.connection_id]; if (typeof callback !== 'function') { callback = null; -- 2.25.1