From: Darren Date: Sat, 5 Oct 2013 14:28:02 +0000 (+0100) Subject: Query panel fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a61a7bc86ba471694c2b07c515ab64eeaa3588bb;p=KiwiIRC.git Query panel fixes --- 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;