Client: using a supplied channel key correctly
authorDarren <darren@Darrens-MacBook-Pro.local>
Wed, 13 Mar 2013 00:28:56 +0000 (00:28 +0000)
committerDarren <darren@Darrens-MacBook-Pro.local>
Wed, 13 Mar 2013 00:28:56 +0000 (00:28 +0000)
client/assets/dev/model_application.js

index 1449e9b11cd62fff619f038f933820aea93e942c..bf48b7c4ba77e15f4024964b5e15e0458e29a814 100644 (file)
@@ -992,7 +992,12 @@ _kiwi.model.Application = function () {
 \r
             channel_names = ev.params.join(' ').split(',');\r
 \r
-            $.each(channel_names, function (index, channel_name) {\r
+            $.each(channel_names, function (index, channel_name_key) {\r
+                // We may have a channel key so split it off\r
+                var spli = channel_name_key.split(' '),\r
+                    channel_name = spli[0],\r
+                    channel_key = spli[1] || '';\r
+\r
                 // Trim any whitespace off the name\r
                 channel_name = channel_name.trim();\r
 \r
@@ -1010,7 +1015,7 @@ _kiwi.model.Application = function () {
                     _kiwi.app.panels.add(channel);\r
                 }\r
 \r
-                _kiwi.gateway.join(channel_name);\r
+                _kiwi.gateway.join(channel_name, channel_key);\r
             });\r
 \r
             if (channel) channel.view.show();\r