[FIX] Broadcast channel is not readonly (#996)

This commit is contained in:
IlarionHalushka 2019-06-20 21:33:15 +03:00 committed by Diego Mello
parent b9c9c3e501
commit 5c8652ec16
1 changed files with 5 additions and 2 deletions

View File

@ -450,7 +450,7 @@ export default class RoomView extends React.Component {
isOwner = () => {
const { room } = this.state;
return room && room.roles && Array.from(Object.keys(room.roles), i => room.roles[i].value).includes('owner');
return room && room.roles && room.roles.length && !!room.roles.find(role => role === 'owner');
}
isMuted = () => {
@ -461,7 +461,10 @@ export default class RoomView extends React.Component {
isReadOnly = () => {
const { room } = this.state;
return (room.ro && !room.broadcast) || this.isMuted() || room.archived;
if (this.isOwner()) {
return false;
}
return (room && room.ro) || this.isMuted();
}
isBlocked = () => {