Commit 145167ba authored by JC Brand's avatar JC Brand

Don't remove ourselves as occupant

when removing offline users who are no longer on the member lists
parent efa5e305
......@@ -78556,6 +78556,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_.each(_.difference(old_jids, jids), removed_jid => {
// Remove absent occupants who've been removed from
// the members lists.
if (removed_jid === _converse.bare_jid) {
return;
}
const occupant = this.findOccupant({
'jid': removed_jid
});
......@@ -1041,6 +1041,7 @@
_.each(_.difference(old_jids, jids), (removed_jid) => {
// Remove absent occupants who've been removed from
// the members lists.
if (removed_jid === _converse.bare_jid) { return; }
const occupant = this.findOccupant({'jid': removed_jid});
if (!occupant) { return; }
if (occupant.get('show') === 'offline') {
......
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