[FIX] Broadcast channel is not readonly (#996)
This commit is contained in:
parent
b9c9c3e501
commit
5c8652ec16
|
@ -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 = () => {
|
||||
|
|
Loading…
Reference in New Issue