Przeglądaj źródła

subject: only try to update the subject when the rol;e changes

Skip processing any other participant updates.
master
Saúl Ibarra Corretgé 5 lat temu
rodzic
commit
eed57e7999
1 zmienionych plików z 7 dodań i 6 usunięć
  1. 7
    6
      react/features/base/conference/middleware.js

+ 7
- 6
react/features/base/conference/middleware.js Wyświetl plik

615
             conference.setDisplayName(participant.name);
615
             conference.setDisplayName(participant.name);
616
         }
616
         }
617
 
617
 
618
-        const { pendingSubjectChange, subject } = getState()['features/base/conference'];
619
-        const isModerator = participant.role === PARTICIPANT_ROLE.MODERATOR;
618
+        if ('role' in participant && participant.role === PARTICIPANT_ROLE.MODERATOR) {
619
+            const { pendingSubjectChange, subject } = getState()['features/base/conference'];
620
 
620
 
621
-        // when local user role is updated to moderator and we have a pending subject change
622
-        // which was not reflected we need to set it (the first time we tried was before becoming moderator)
623
-        if (isModerator && pendingSubjectChange !== subject) {
624
-            dispatch(setSubject(pendingSubjectChange));
621
+            // When the local user role is updated to moderator and we have a pending subject change
622
+            // which was not reflected we need to set it (the first time we tried was before becoming moderator).
623
+            if (pendingSubjectChange !== subject) {
624
+                dispatch(setSubject(pendingSubjectChange));
625
+            }
625
         }
626
         }
626
     }
627
     }
627
 
628
 

Ładowanie…
Anuluj
Zapisz