fix(conference): react to local role change only when it changes
We initialise the UI for isModerator = false on startup, so we should not react to the event unless it gets out of sync.
This commit is contained in:
parent
f10177a352
commit
dad3c57fad
|
@ -1101,8 +1101,10 @@ export default {
|
|||
room.on(ConferenceEvents.USER_ROLE_CHANGED, (id, role) => {
|
||||
if (this.isLocalId(id)) {
|
||||
console.info(`My role changed, new role: ${role}`);
|
||||
this.isModerator = room.isModerator();
|
||||
APP.UI.updateLocalRole(room.isModerator());
|
||||
if (this.isModerator !== room.isModerator()) {
|
||||
this.isModerator = room.isModerator();
|
||||
APP.UI.updateLocalRole(room.isModerator());
|
||||
}
|
||||
} else {
|
||||
let user = room.getParticipantById(id);
|
||||
if (user) {
|
||||
|
|
Loading…
Reference in New Issue