From 170d10a1a6d1d66116a4a020a6f6b2c6e53f7cbe Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 19 Apr 2020 12:09:07 +0100 Subject: [PATCH] Add rageshake slash command Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/SlashCommands.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 71815dde8c..68bbfa97f3 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -35,6 +35,8 @@ import { abbreviateUrl } from './utils/UrlUtils'; import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from './utils/IdentityServerUtils'; import {isPermalinkHost, parsePermalink} from "./utils/permalinks/Permalinks"; import {inviteUsersToRoom} from "./RoomInvite"; +import sendBugReport from "./rageshake/submit-rageshake"; +import SdkConfig from "./SdkConfig"; // XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816 interface HTMLInputEvent extends Event { @@ -912,6 +914,19 @@ export const Commands = [ }, category: CommandCategories.advanced, }), + new Command({ + command: "rageshake", + aliases: ["bugreport"], + description: _td("Send a bug report with logs"), + args: "", + runFn: function(roomId, args) { + return success(sendBugReport(SdkConfig.get().bug_report_endpoint_url, { + userText: args, + sendLogs: true, + })); + }, + category: CommandCategories.advanced, + }), // Command definitions for autocompletion ONLY: // /me is special because its not handled by SlashCommands.js and is instead done inside the Composer classes