Require a rageshake description in mxSendRageshake

This commit is contained in:
Travis Ralston 2019-07-11 12:58:35 -06:00
parent bba167c433
commit 79b519be72
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ initRageshake();
global.mxSendRageshake = function(text, withLogs) {
if (withLogs === undefined) withLogs = true;
if (!text || !text.trim()) {
console.error("Cannot send a rageshake without a message - please tell us what went wrong");
return;
}
require(['matrix-react-sdk/lib/rageshake/submit-rageshake'], (s) => {
s(SdkConfig.get().bug_report_endpoint_url, {
userText: text,