Selaa lähdekoodia

fix(JitsiConference): skip participant kicked event for kicker

With the introduction of lobby the ChatRoom KICKED event is now also emitted for
ourselves (the kicker) so we want to avoid emitting an event where `undefined`
kicked someone.
dev1
Saúl Ibarra Corretgé 5 vuotta sitten
vanhempi
commit
e2626b2d75
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7
    0
      JitsiConference.js

+ 7
- 0
JitsiConference.js Näytä tiedosto

@@ -1594,6 +1594,13 @@ JitsiConference.prototype.onMemberLeft = function(jid) {
1594 1594
  * this is the id of the participant which was kicked.
1595 1595
  */
1596 1596
 JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kickedParticipantId) {
1597
+    // This check which be true when we kick someone else. With the introduction of lobby
1598
+    // the ChatRoom KICKED event is now also emitted for ourselves (the kicker) so we want to
1599
+    // avoid emitting an event where `undefined` kicked someone.
1600
+    if (actorId === this.myUserId()) {
1601
+        return;
1602
+    }
1603
+
1597 1604
     const actorParticipant = this.participants[actorId];
1598 1605
 
1599 1606
     if (isSelfPresence) {

Loading…
Peruuta
Tallenna