Migrate all pinning checks and actions into PinningUtils (#12964)

This commit is contained in:
Florian Duros 2024-09-05 16:37:24 +02:00 committed by GitHub
parent 26399237f6
commit 5bfbca9eb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 146 additions and 67 deletions

View file

@ -177,7 +177,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
this.props.mxEvent.getType() !== EventType.RoomServerAcl &&
this.props.mxEvent.getType() !== EventType.RoomEncryption;
const canPin = PinningUtils.canPinOrUnpin(cli, this.props.mxEvent);
const canPin = PinningUtils.canPin(cli, this.props.mxEvent) || PinningUtils.canUnpin(cli, this.props.mxEvent);
this.setState({ canRedact, canPin });
};