Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Log errors out of the report event dialog
Browse files Browse the repository at this point in the history
So we can actually see them in rageshakes
  • Loading branch information
turt2live committed Apr 7, 2022
1 parent 2757997 commit da3ede8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/views/dialogs/ReportEventDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -213,7 +214,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
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,
Expand All @@ -233,6 +234,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
}
this.props.onFinished(true);
} catch (e) {
logger.error(e);
this.setState({
busy: false,
err: e.message,
Expand Down

0 comments on commit da3ede8

Please sign in to comment.