Commit aa509424 authored by JC Brand's avatar JC Brand

Don't show join message for non-online occupants created from members list

Fixes #1169
parent 8c772a7f
......@@ -6,6 +6,7 @@
- Bugfix. MUC features weren't being refreshed when saving the config form
- #1063 URLs in the topic / subject are not clickable
- #1140 Add support for destroyed chatrooms
- #1169 Non-joined participants display an unwanted status message
- #1190 MUC Participants column disappears in certain viewport widths
- #1199 Can't get back from to login screen from registration screen
- #1204 Link encoding issue
......
......@@ -68681,7 +68681,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
this.model.on('configurationNeeded', this.getAndRenderConfigurationForm, this);
this.model.on('destroy', this.hide, this);
this.model.on('show', this.show, this);
this.model.occupants.on('add', this.showJoinNotification, this);
this.model.occupants.on('add', this.onOccupantAdded, this);
this.model.occupants.on('remove', this.showLeaveNotification, this);
this.model.occupants.on('change:show', this.showJoinOrLeaveNotification, this);
this.model.occupants.on('change:role', this.informOfOccupantsRoleChange, this);
......@@ -69700,8 +69700,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
},
onOccupantAdded(occupant) {
if (occupant.get('show') === 'online') {
this.showJoinNotification(occupant);
}
},
showJoinOrLeaveNotification(occupant) {
if (!occupant.isMember() || _.includes(occupant.get('states'), '303')) {
if (_.includes(occupant.get('states'), '303')) {
return;
}
......@@ -540,7 +540,7 @@
this.model.on('destroy', this.hide, this);
this.model.on('show', this.show, this);
this.model.occupants.on('add', this.showJoinNotification, this);
this.model.occupants.on('add', this.onOccupantAdded, this);
this.model.occupants.on('remove', this.showLeaveNotification, this);
this.model.occupants.on('change:show', this.showJoinOrLeaveNotification, this);
this.model.occupants.on('change:role', this.informOfOccupantsRoleChange, this);
......@@ -1476,6 +1476,12 @@
}
},
onOccupantAdded (occupant) {
if (occupant.get('show') === 'online') {
this.showJoinNotification(occupant);
}
},
showJoinOrLeaveNotification (occupant) {
if (_.includes(occupant.get('states'), '303')) {
return;
......
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