Commit 5ed8dfbe authored by JC Brand's avatar JC Brand

Get chat box views by id

Fixes bug when fetching controlbox, which doesn't have a jid
parent 95d7c306
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
* returned via the API. * returned via the API.
*/ */
if (!chatbox) { return; } if (!chatbox) { return; }
var view = converse.chatboxviews.get(chatbox.get('jid')); var view = converse.chatboxviews.get(chatbox.get('id'));
return { return {
'close': view.close.bind(view), 'close': view.close.bind(view),
'focus': view.focus.bind(view), 'focus': view.focus.bind(view),
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
* returned via the API. * returned via the API.
*/ */
if (!chatbox) { return; } if (!chatbox) { return; }
var view = converse.chatboxviews.get(chatbox.get('jid')); var view = converse.chatboxviews.get(chatbox.get('id'));
var box = this._super.wrappedChatBox.apply(this, arguments); var box = this._super.wrappedChatBox.apply(this, arguments);
box.is_chatroom = view.is_chatroom; box.is_chatroom = view.is_chatroom;
return box; return box;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment