From cbc0a40e12876ba3be44dead4ed671fc7c436238 Mon Sep 17 00:00:00 2001 From: Lauri Niskanen Date: Wed, 1 Feb 2017 18:13:12 +0200 Subject: [PATCH] Allow setting contact attrs on chats.open --- src/converse-api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/converse-api.js b/src/converse-api.js index 388cc9f6a..3261e9ce5 100644 --- a/src/converse-api.js +++ b/src/converse-api.js @@ -106,20 +106,20 @@ } }, 'chats': { - 'open': function (jids) { + 'open': function (jids, attrs) { var chatbox; if (_.isUndefined(jids)) { converse.log("chats.open: You need to provide at least one JID", "error"); return null; } else if (_.isString(jids)) { chatbox = converse.wrappedChatBox( - converse.chatboxes.getChatBox(jids, true).trigger('show') + converse.chatboxes.getChatBox(jids, true, attrs).trigger('show') ); return chatbox; } return _.map(jids, function (jid) { chatbox = converse.wrappedChatBox( - converse.chatboxes.getChatBox(jid, true).trigger('show') + converse.chatboxes.getChatBox(jid, true, attrs).trigger('show') ); return chatbox; });