From a61a7bc86ba471694c2b07c515ab64eeaa3588bb Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 5 Oct 2013 15:28:02 +0100 Subject: [PATCH] Query panel fixes --- client/assets/src/models/application.js | 10 +++++++++- client/assets/src/models/query.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/assets/src/models/application.js b/client/assets/src/models/application.js index 989865e..50d7b58 100644 --- a/client/assets/src/models/application.js +++ b/client/assets/src/models/application.js @@ -687,9 +687,12 @@ _kiwi.model.Application = function () { } function queryCommand (ev) { - var destination, panel; + var destination, message, panel; destination = ev.params[0]; + ev.params.shift(); + + message = ev.params.join(' '); // Check if we have the panel already. If not, create it panel = that.connections.active_connection.panels.getByName(destination); @@ -700,6 +703,11 @@ _kiwi.model.Application = function () { if (panel) panel.view.show(); + if (message) { + that.connections.active_connection.gateway.msg(panel.get('name'), message); + panel.addMsg(_kiwi.app.connections.active_connection.get('nick'), message); + } + } function msgCommand (ev) { diff --git a/client/assets/src/models/query.js b/client/assets/src/models/query.js index 8d4de5b..3cf82ff 100644 --- a/client/assets/src/models/query.js +++ b/client/assets/src/models/query.js @@ -1,4 +1,4 @@ -_kiwi.model.Query = _kiwi.model.Panel.extend({ +_kiwi.model.Query = _kiwi.model.Channel.extend({ initialize: function (attributes) { var name = this.get("name") || "", members; -- 2.25.1