diff --git a/app/views/RoomView/index.js b/app/views/RoomView/index.js index 3ed9a8e33..6ed1b0445 100644 --- a/app/views/RoomView/index.js +++ b/app/views/RoomView/index.js @@ -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 = () => {