File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
22Copyright 2018 New Vector Ltd
3+ Copyright 2020 The Matrix.org Foundation C.I.C.
34
45Licensed under the Apache License, Version 2.0 (the "License");
56you may not use this file except in compliance with the License.
@@ -27,6 +28,7 @@ limitations under the License.
2728
2829import * as rageshake from "matrix-react-sdk/src/rageshake/rageshake" ;
2930import SdkConfig from "matrix-react-sdk/src/SdkConfig" ;
31+ import sendBugReport from "matrix-react-sdk/src/rageshake/submit-rageshake" ;
3032
3133function initRageshake ( ) {
3234 rageshake . init ( ) . then ( ( ) => {
@@ -54,15 +56,13 @@ global.mxSendRageshake = function(text, withLogs) {
5456 console . error ( "Cannot send a rageshake without a message - please tell us what went wrong" ) ;
5557 return ;
5658 }
57- require ( [ 'matrix-react-sdk/src/rageshake/submit-rageshake' ] , ( s ) => {
58- s ( SdkConfig . get ( ) . bug_report_endpoint_url , {
59- userText : text ,
60- sendLogs : withLogs ,
61- progressCallback : console . log . bind ( console ) ,
62- } ) . then ( ( ) => {
63- console . log ( "Bug report sent!" ) ;
64- } , ( err ) => {
65- console . error ( err ) ;
66- } ) ;
59+ sendBugReport ( SdkConfig . get ( ) . bug_report_endpoint_url , {
60+ userText : text ,
61+ sendLogs : withLogs ,
62+ progressCallback : console . log . bind ( console ) ,
63+ } ) . then ( ( ) => {
64+ console . log ( "Bug report sent!" ) ;
65+ } , ( err ) => {
66+ console . error ( err ) ;
6767 } ) ;
6868} ;
You can’t perform that action at this time.
0 commit comments