Prevent peeking members from reacting

Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
This commit is contained in:
Jaiwanth 2021-04-29 22:41:57 +05:30
parent d203e8f129
commit 70204d6111

View File

@ -129,12 +129,13 @@ export default class ReactionsRowButton extends React.PureComponent {
}, },
); );
} }
const isPeeking = room.getMyMembership() !== "join";
const AccessibleButton = sdk.getComponent('elements.AccessibleButton'); const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
return <AccessibleButton return <AccessibleButton
className={classes} className={classes}
aria-label={label} aria-label={label}
onClick={this.onClick} onClick={this.onClick}
disabled={isPeeking}
onMouseOver={this.onMouseOver} onMouseOver={this.onMouseOver}
onMouseLeave={this.onMouseLeave} onMouseLeave={this.onMouseLeave}
> >