Bugfix. Don't show hidden MUCs when new message received.

This commit is contained in:
JC Brand 2018-02-14 13:44:17 +01:00
parent fc560bf8ac
commit 732c923324
5 changed files with 19 additions and 6 deletions

View File

@ -5,6 +5,8 @@
### Bugfixes ### Bugfixes
- Attribute error when empty IQ stanza is returned for vCard query - Attribute error when empty IQ stanza is returned for vCard query
- Don't allow PEP bookmarks if `pubsub#publish-options` is not advertised by the server. - Don't allow PEP bookmarks if `pubsub#publish-options` is not advertised by the server.
- In fullscreen view, sometimes a background MUC would come into the foreground
when a new message appears inside it.
_Note: previously this meant that bookmarks sent to servers that don't _Note: previously this meant that bookmarks sent to servers that don't
support `pubsub#publish-options` were visible to all your contacts, even support `pubsub#publish-options` were visible to all your contacts, even
@ -27,6 +29,8 @@ though they should be private._
- New configuration setting [root](https://conversejs.org/docs/html/configurations.html#root) - New configuration setting [root](https://conversejs.org/docs/html/configurations.html#root)
- The [view_mode](https://conversejs.org/docs/html/configurations.html#view-mode) setting now has a new possible value: `embedded` - The [view_mode](https://conversejs.org/docs/html/configurations.html#view-mode) setting now has a new possible value: `embedded`
### Translation updates
- Chinese (Traditional), French, German, Portuguese (Brazil), Russian, Ukrainian
## 3.3.2 (2018-01-29) ## 3.3.2 (2018-01-29)

View File

@ -1136,6 +1136,7 @@
afterShown (focus) { afterShown (focus) {
if (u.isPersistableModel(this.model)) { if (u.isPersistableModel(this.model)) {
this.model.clearUnreadMsgCounter();
this.model.save(); this.model.save();
} }
this.setChatState(_converse.ACTIVE); this.setChatState(_converse.ACTIVE);

View File

@ -558,9 +558,8 @@
* *
* This is instead done in `afterConnected` below. * This is instead done in `afterConnected` below.
*/ */
if (this.model.collection && this.model.collection.browserStorage) { if (u.isPersistableModel(this.model)) {
// Without a connection, we haven't yet initialized this.model.clearUnreadMsgCounter();
// localstorage
this.model.save(); this.model.save();
} }
this.occupantsview.setOccupantsHeight(); this.occupantsview.setOccupantsHeight();

View File

@ -104,6 +104,15 @@
} }
}, },
ChatRoomView: {
show (focus) {
if (!this.model.get('hidden')) {
_.each(this.__super__._converse.chatboxviews.xget(this.model.get('id')), hideChat);
return this.__super__.show.apply(this, arguments);
}
}
},
RosterContactView: { RosterContactView: {
openChat (ev) { openChat (ev) {
/* We only have one chat visible at any one /* We only have one chat visible at any one