You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	Add rageshake slash command
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
		@@ -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: "<description>",
 | 
			
		||||
        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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user