You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Run the rageshake command through the bug report dialog
Ideally we encourage users to give us information like a github issue or options to download their logs.
This commit is contained in:
		@@ -38,8 +38,7 @@ import {inviteUsersToRoom} from "./RoomInvite";
 | 
			
		||||
import { WidgetType } from "./widgets/WidgetType";
 | 
			
		||||
import { Jitsi } from "./widgets/Jitsi";
 | 
			
		||||
import { parseFragment as parseHtml } from "parse5";
 | 
			
		||||
import sendBugReport from "./rageshake/submit-rageshake";
 | 
			
		||||
import SdkConfig from "./SdkConfig";
 | 
			
		||||
import BugReportDialog from "./components/views/dialogs/BugReportDialog";
 | 
			
		||||
import { ensureDMExists } from "./createRoom";
 | 
			
		||||
import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
 | 
			
		||||
import { Action } from "./dispatcher/actions";
 | 
			
		||||
@@ -975,16 +974,9 @@ export const Commands = [
 | 
			
		||||
        args: "<description>",
 | 
			
		||||
        runFn: function(roomId, args) {
 | 
			
		||||
            return success(
 | 
			
		||||
                sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
 | 
			
		||||
                    userText: args,
 | 
			
		||||
                    sendLogs: true,
 | 
			
		||||
                }).then(() => {
 | 
			
		||||
                    const InfoDialog = sdk.getComponent('dialogs.InfoDialog');
 | 
			
		||||
                    Modal.createTrackedDialog('Slash Commands', 'Rageshake sent', InfoDialog, {
 | 
			
		||||
                        title: _t('Logs sent'),
 | 
			
		||||
                        description: _t('Thank you!'),
 | 
			
		||||
                    });
 | 
			
		||||
                }),
 | 
			
		||||
                Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {
 | 
			
		||||
                    initialText: args,
 | 
			
		||||
                }).finished,
 | 
			
		||||
            );
 | 
			
		||||
        },
 | 
			
		||||
        category: CommandCategories.advanced,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user