From 79b519be7272db19f2992d29fb39ef3494147141 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 11 Jul 2019 12:58:35 -0600 Subject: [PATCH] Require a rageshake description in mxSendRageshake --- src/vector/rageshakesetup.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vector/rageshakesetup.js b/src/vector/rageshakesetup.js index 4c376249..e1dc5e24 100644 --- a/src/vector/rageshakesetup.js +++ b/src/vector/rageshakesetup.js @@ -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,