Browse Source

Only show leave notifications when we're in the MUC

Otherwise when `removeNonMembers` gets called as we reconnect, we get a
long list of erroneous leave notifications.
JC Brand 6 năm trước cách đây
mục cha
commit
216a67c165
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/converse-muc-views.js

+ 2 - 1
src/converse-muc-views.js

@@ -1296,7 +1296,8 @@ converse.plugins.add('converse-muc-views', {
             },
 
             onOccupantRemoved (occupant) {
-                if (occupant.get('show') === 'online') {
+                if (this.model.get('connection_status') ===  converse.ROOMSTATUS.ENTERED &&
+                        occupant.get('show') === 'online') {
                     this.showLeaveNotification(occupant);
                 }
             },