|
@@ -615,13 +615,14 @@ function _updateLocalParticipantInConference({ dispatch, getState }, next, actio
|
615
|
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
|
|