diff --git a/src/components/views/dialogs/ReportEventDialog.tsx b/src/components/views/dialogs/ReportEventDialog.tsx index 94102f7b12..7a2d51889f 100644 --- a/src/components/views/dialogs/ReportEventDialog.tsx +++ b/src/components/views/dialogs/ReportEventDialog.tsx @@ -16,6 +16,7 @@ limitations under the License. import React from 'react'; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; +import { logger } from "matrix-js-sdk/src/logger"; import { _t } from '../../../languageHandler'; import { ensureDMExists } from "../../../createRoom"; @@ -213,7 +214,7 @@ export default class ReportEventDialog extends React.Component { try { const client = MatrixClientPeg.get(); const ev = this.props.mxEvent; - if (this.moderation && this.state.nature != NonStandardValue.Admin) { + if (this.moderation && this.state.nature !== NonStandardValue.Admin) { const nature: Nature = this.state.nature; // Report to moderators through to the dedicated bot, @@ -233,6 +234,7 @@ export default class ReportEventDialog extends React.Component { } this.props.onFinished(true); } catch (e) { + logger.error(e); this.setState({ busy: false, err: e.message, diff --git a/src/utils/DialogOpener.ts b/src/utils/DialogOpener.ts index 263982add2..dadce60ef6 100644 --- a/src/utils/DialogOpener.ts +++ b/src/utils/DialogOpener.ts @@ -70,7 +70,7 @@ export class DialogOpener { break; case Action.OpenReportEventDialog: Modal.createTrackedDialog('Report Event', '', ReportEventDialog, { - event: payload.event, + mxEvent: payload.event, }, 'mx_Dialog_reportEvent'); break; case Action.OpenTabbedIntegrationManagerDialog: