2 parents b5c27ca + 373f850 commit 10671aaCopy full SHA for 10671aa
1 file changed
src/vector/rageshakesetup.js
@@ -26,6 +26,7 @@ limitations under the License.
26
*/
27
28
import rageshake from "matrix-react-sdk/lib/rageshake/rageshake";
29
+import SdkConfig from "matrix-react-sdk/src/SdkConfig";
30
31
function initRageshake() {
32
rageshake.init().then(() => {
@@ -44,3 +45,18 @@ function initRageshake() {
44
45
}
46
47
initRageshake();
48
+
49
+global.mxSendRageshake = function(text, withLogs) {
50
+ if (withLogs === undefined) withLogs = true;
51
+ require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
52
+ s(SdkConfig.get().bug_report_endpoint_url, {
53
+ userText: text,
54
+ sendLogs: withLogs,
55
+ progressCallback: console.log.bind(console),
56
+ }).then(() => {
57
+ console.log("Bug report sent!");
58
+ }, (err) => {
59
+ console.error(err);
60
+ });
61
62
+};
0 commit comments