Przeglądaj źródła

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 lat temu
rodzic
commit
e2626b2d75
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7
    0
      JitsiConference.js

+ 7
- 0
JitsiConference.js Wyświetl plik

1594
  * this is the id of the participant which was kicked.
1594
  * this is the id of the participant which was kicked.
1595
  */
1595
  */
1596
 JitsiConference.prototype.onMemberKicked = function(isSelfPresence, actorId, kickedParticipantId) {
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
     const actorParticipant = this.participants[actorId];
1604
     const actorParticipant = this.participants[actorId];
1598
 
1605
 
1599
     if (isSelfPresence) {
1606
     if (isSelfPresence) {

Ładowanie…
Anuluj
Zapisz