Commit 54136a94 authored by JC Brand's avatar JC Brand

Merge branch 'pr/chats_open_attrs' of https://github.com/Ape/converse.js into...

Merge branch 'pr/chats_open_attrs' of https://github.com/Ape/converse.js into Ape-pr/chats_open_attrs
parents d334870d cbc0a40e
......@@ -12,6 +12,7 @@
- Render the login form again upon authfail. [jcbrand]
- #486 Honor existing mam user configuration [throwaway42]
- #749 /me will show your contact's name in the sent field [jcbrand]
- #770 Allow setting contact attrs on chats.open [Ape]
- #774 Browser language (fr-fr or fr) is not detected by default [jcbrand]
- #775 Anonymous login form is a text field instead of a push button [jcbrand]
......
......@@ -104,20 +104,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;
});
......
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