Merge pull request #3809 from vector-im/rav/include_mx_id_in_rageshake
Include MXID and device id in rageshakes
This commit is contained in:
commit
d419024da9
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import pako from 'pako';
|
import pako from 'pako';
|
||||||
import q from "q";
|
import q from "q";
|
||||||
|
|
||||||
|
import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg';
|
||||||
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
|
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
|
||||||
|
|
||||||
import rageshake from './rageshake'
|
import rageshake from './rageshake'
|
||||||
|
@ -64,6 +65,8 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
||||||
userAgent = window.navigator.userAgent;
|
userAgent = window.navigator.userAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const client = MatrixClientPeg.get();
|
||||||
|
|
||||||
console.log("Sending bug report.");
|
console.log("Sending bug report.");
|
||||||
|
|
||||||
const body = new FormData();
|
const body = new FormData();
|
||||||
|
@ -72,6 +75,11 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
|
||||||
body.append('version', version);
|
body.append('version', version);
|
||||||
body.append('user_agent', userAgent);
|
body.append('user_agent', userAgent);
|
||||||
|
|
||||||
|
if (client) {
|
||||||
|
body.append('user_id', client.credentials.userId);
|
||||||
|
body.append('device_id', client.deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
if (opts.sendLogs) {
|
if (opts.sendLogs) {
|
||||||
progressCallback("Collecting logs");
|
progressCallback("Collecting logs");
|
||||||
const logs = await rageshake.getLogsForReport();
|
const logs = await rageshake.getLogsForReport();
|
||||||
|
|
Loading…
Reference in New Issue