Skip to content

Commit

Permalink
Merge pull request #3809 from vector-im/rav/include_mx_id_in_rageshake
Browse files Browse the repository at this point in the history
Include MXID and device id in rageshakes
  • Loading branch information
dbkr committed May 4, 2017
2 parents e6e2e69 + 45efdbd commit d419024
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vector/submit-rageshake.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
import pako from 'pako';
import q from "q";

import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';

import rageshake from './rageshake'
Expand Down Expand Up @@ -64,6 +65,8 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
userAgent = window.navigator.userAgent;
}

const client = MatrixClientPeg.get();

console.log("Sending bug report.");

const body = new FormData();
Expand All @@ -72,6 +75,11 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
body.append('version', version);
body.append('user_agent', userAgent);

if (client) {
body.append('user_id', client.credentials.userId);
body.append('device_id', client.deviceId);
}

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

0 comments on commit d419024

Please sign in to comment.