|
@@ -1452,6 +1452,7 @@ export default class ChatRoom extends Listenable {
|
1452
|
1452
|
type: 'set' })
|
1453
|
1453
|
.c('query', {
|
1454
|
1454
|
xmlns: 'http://jabber.org/protocol/muc#admin' });
|
|
1455
|
+ let sendIq = false;
|
1455
|
1456
|
|
1456
|
1457
|
Object.values(this.members).forEach(m => {
|
1457
|
1458
|
if (m.jid && !MEMBERS_AFFILIATIONS.includes(m.affiliation)) {
|
|
@@ -1459,9 +1460,11 @@ export default class ChatRoom extends Listenable {
|
1459
|
1460
|
'affiliation': 'member',
|
1460
|
1461
|
'jid': Strophe.getBareJidFromJid(m.jid)
|
1461
|
1462
|
}).up();
|
|
1463
|
+ sendIq = true;
|
1462
|
1464
|
}
|
1463
|
1465
|
});
|
1464
|
|
- this.xmpp.connection.sendIQ(affiliationsIq.up());
|
|
1466
|
+
|
|
1467
|
+ sendIq && this.xmpp.connection.sendIQ(affiliationsIq.up());
|
1465
|
1468
|
}
|
1466
|
1469
|
|
1467
|
1470
|
const errorCallback = onError ? onError : () => {}; // eslint-disable-line no-empty-function
|