Re-renable Share option for location messages (#7596)

This commit is contained in:
Andy Balaam 2022-01-24 12:28:17 +00:00 committed by GitHub
parent 83b0d123c1
commit b02c6c7953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,7 +378,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
let permalink: string | null = null;
let permalinkButton: ReactElement | null = null;
if (canShare(mxEvent)) {
if (this.props.permalinkCreator) {
permalink = this.props.permalinkCreator.forEvent(this.props.mxEvent.getId());
}
@ -398,7 +397,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
}
/>
);
}
if (this.canEndPoll(mxEvent)) {
endPollButton = (
@ -519,10 +517,6 @@ function canForward(event: MatrixEvent): boolean {
return !isLocationEvent(event);
}
function canShare(event: MatrixEvent): boolean {
return !isLocationEvent(event);
}
function isLocationEvent(event: MatrixEvent): boolean {
const eventType = event.getType();
return (