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

Commit da3ede8

Browse files
committed
Log errors out of the report event dialog
So we can actually see them in rageshakes
1 parent 2757997 commit da3ede8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/views/dialogs/ReportEventDialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
import React from 'react';
1818
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
19+
import { logger } from "matrix-js-sdk/src/logger";
1920

2021
import { _t } from '../../../languageHandler';
2122
import { ensureDMExists } from "../../../createRoom";
@@ -213,7 +214,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
213214
try {
214215
const client = MatrixClientPeg.get();
215216
const ev = this.props.mxEvent;
216-
if (this.moderation && this.state.nature != NonStandardValue.Admin) {
217+
if (this.moderation && this.state.nature !== NonStandardValue.Admin) {
217218
const nature: Nature = this.state.nature;
218219

219220
// Report to moderators through to the dedicated bot,
@@ -233,6 +234,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
233234
}
234235
this.props.onFinished(true);
235236
} catch (e) {
237+
logger.error(e);
236238
this.setState({
237239
busy: false,
238240
err: e.message,

0 commit comments

Comments
 (0)