Add modal to confirm that rageshake from cmd was sent

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-19 12:19:31 +01:00
parent d0410ade5e
commit 881848b98b
2 changed files with 14 additions and 6 deletions

View file

@ -920,10 +920,18 @@ export const Commands = [
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,
}));
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!'),
});
}),
);
},
category: CommandCategories.advanced,
}),