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

Add label to rageshakes for React soft crashes #3535

Merged
merged 1 commit into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/views/dialogs/BugReportDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Copyright 2017 OpenMarket Ltd
Copyright 2018 New Vector Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2019 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -71,6 +72,7 @@ export default class BugReportDialog extends React.Component {
userText,
sendLogs: true,
progressCallback: this._sendProgressCallback,
label: this.props.label,
}).then(() => {
if (!this._unmounted) {
this.props.onFinished(false);
Expand Down
4 changes: 3 additions & 1 deletion src/components/views/elements/ErrorBoundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export default class ErrorBoundary extends React.PureComponent {
if (!BugReportDialog) {
return;
}
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {});
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {
label: 'react-soft-crash',
});
};

render() {
Expand Down
5 changes: 5 additions & 0 deletions src/rageshake/submit-rageshake.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
Copyright 2017 OpenMarket Ltd
Copyright 2018 New Vector Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -81,6 +82,10 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
body.append('device_id', client.deviceId);
}

if (opts.label) {
body.append('label', opts.label);
}

if (opts.sendLogs) {
progressCallback(_t("Collecting logs"));
const logs = await rageshake.getLogsForReport();
Expand Down