Merge branch 'pr/chats_open_attrs' of https://github.com/Ape/converse.js into Ape-pr/chats_open_attrs
This commit is contained in:
commit
54136a9447
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user