mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-26 17:01:49 +02:00
Merge pull request #3685 from aaronraimist/edit-message-remove-btn
Hide Remove button in message editing history if you don't have permission to redact
This commit is contained in:
commit
0d63a2bea1
@ -102,9 +102,9 @@ export default class EditHistoryMessage extends React.PureComponent {
|
|||||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
// hide the button when already redacted
|
// hide the button when already redacted
|
||||||
let redactButton;
|
let redactButton;
|
||||||
if (!this.props.mxEvent.isRedacted() && !this.props.isBaseEvent) {
|
if (!this.props.mxEvent.isRedacted() && !this.props.isBaseEvent && this.state.canRedact) {
|
||||||
redactButton = (
|
redactButton = (
|
||||||
<AccessibleButton onClick={this._onRedactClick} disabled={!this.state.canRedact}>
|
<AccessibleButton onClick={this._onRedactClick}>
|
||||||
{_t("Remove")}
|
{_t("Remove")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user