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