Don't maximize minimized rooms when calling rooms.open
This commit is contained in:
parent
96d311e2e9
commit
9edc97101b
@ -18,6 +18,7 @@
|
||||
initialization is complete. [jcbrand]
|
||||
- New event ['reconnecting'](https://conversejs.org/docs/html/development.html#reconnecting) [jcbrand]
|
||||
- New configuration setting [allow_bookmarks](https://conversejs.org/docs/html/configuration.html#allow_bookmarks) [jcbrand]
|
||||
- The `rooms.open` API method will no longer maximize rooms that are minimized (unless `maximize: true` is passed in). [jcbrand]
|
||||
|
||||
## 2.0.1 (2016-11-07)
|
||||
- #203 New configuration setting [muc_domain](https://conversejs.org/docs/html/configuration.html#muc_domain) [jcbrand]
|
||||
|
@ -578,6 +578,8 @@ Room attributes that may be passed in:
|
||||
For a list of configuration values that can be passed in, refer to these values
|
||||
in the `XEP-0045 MUC specification <http://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner>`_.
|
||||
The values should be named without the ``muc#roomconfig_`` prefix.
|
||||
* *maximize*: A boolean, indicating whether minimized rooms should also be
|
||||
maximized, when opened. Set to ``false`` by default.
|
||||
|
||||
For example, opening a room with a specific default configuration:
|
||||
|
||||
|
@ -196,7 +196,8 @@
|
||||
/* Find the chat box and show it. If it doesn't exist, create it.
|
||||
*/
|
||||
var chatbox = this.__super__.showChat.apply(this, arguments);
|
||||
if (chatbox.get('minimized')) {
|
||||
var maximize = _.isUndefined(attrs.maximize) ? true : attrs.maximize;
|
||||
if (chatbox.get('minimized') && maximize) {
|
||||
chatbox.maximize();
|
||||
}
|
||||
return chatbox;
|
||||
|
@ -1830,6 +1830,9 @@
|
||||
} else if (typeof attrs === "undefined") {
|
||||
attrs = {};
|
||||
}
|
||||
if (_.isUndefined(attrs.maximize)) {
|
||||
attrs.maximize = false;
|
||||
}
|
||||
var fetcher = converse.chatboxviews.showChat.bind(converse.chatboxviews);
|
||||
if (!attrs.nick && converse.muc_nickname_from_jid) {
|
||||
attrs.nick = Strophe.getNodeFromJid(converse.bare_jid);
|
||||
|
Loading…
Reference in New Issue
Block a user