From 5ed8dfbe0aae5698da00d2126440e8ae374dd1fb Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 5 Jul 2016 07:43:34 +0200 Subject: [PATCH] Get chat box views by id Fixes bug when fetching controlbox, which doesn't have a jid --- src/converse-core.js | 2 +- src/converse-muc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/converse-core.js b/src/converse-core.js index d9df9b916..18691170f 100755 --- a/src/converse-core.js +++ b/src/converse-core.js @@ -187,7 +187,7 @@ * returned via the API. */ if (!chatbox) { return; } - var view = converse.chatboxviews.get(chatbox.get('jid')); + var view = converse.chatboxviews.get(chatbox.get('id')); return { 'close': view.close.bind(view), 'focus': view.focus.bind(view), diff --git a/src/converse-muc.js b/src/converse-muc.js index de7e73815..f7cb8ab21 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -65,7 +65,7 @@ * returned via the API. */ 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); box.is_chatroom = view.is_chatroom; return box;