You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-07 03:42:20 +03:00
Eliminate the use of MatrixClientPeg in utils (#10910)
This commit is contained in:
committed by
GitHub
parent
a0c2676c38
commit
30429df948
@@ -363,7 +363,12 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
editEvent(this.props.mxEvent, this.context.timelineRenderingType, this.props.getRelationsForEvent);
|
||||
editEvent(
|
||||
MatrixClientPeg.get(),
|
||||
this.props.mxEvent,
|
||||
this.context.timelineRenderingType,
|
||||
this.props.getRelationsForEvent,
|
||||
);
|
||||
};
|
||||
|
||||
private readonly forbiddenThreadHeadMsgType = [MsgType.KeyVerificationRequest];
|
||||
@@ -424,7 +429,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
||||
|
||||
public render(): React.ReactNode {
|
||||
const toolbarOpts: JSX.Element[] = [];
|
||||
if (canEditContent(this.props.mxEvent)) {
|
||||
if (canEditContent(MatrixClientPeg.get(), this.props.mxEvent)) {
|
||||
toolbarOpts.push(
|
||||
<RovingAccessibleTooltipButton
|
||||
className="mx_MessageActionBar_iconButton"
|
||||
|
||||
Reference in New Issue
Block a user