Disable redacting reactions if we don't have sufficient permissions (#8767)
This commit is contained in:
parent
3f99f594de
commit
9b8b1d193e
11 changed files with 37 additions and 9 deletions
|
@ -183,7 +183,10 @@ export default class ReactionsRow extends React.PureComponent<IProps, IState> {
|
|||
mxEvent={mxEvent}
|
||||
reactionEvents={events}
|
||||
myReactionEvent={myReactionEvent}
|
||||
disabled={!this.context.canReact}
|
||||
disabled={
|
||||
!this.context.canReact ||
|
||||
(myReactionEvent && !myReactionEvent.isRedacted() && !this.context.canSelfRedact)
|
||||
}
|
||||
/>;
|
||||
}).filter(item => !!item);
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ interface IState {
|
|||
|
||||
export default class ReactionsRowButton extends React.PureComponent<IProps, IState> {
|
||||
static contextType = MatrixClientContext;
|
||||
public context!: React.ContextType<typeof MatrixClientContext>;
|
||||
|
||||
state = {
|
||||
tooltipRendered: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue