mirror of
https://github.com/vector-im/element-web.git
synced 2024-09-10 07:05:14 +00:00
Merge pull request #15201 from vector-im/t3chguy/fix/15172
If no bug_report_endpoint_url, hide rageshaking from the App
This commit is contained in:
commit
8c31911677
1 changed files with 7 additions and 1 deletions
|
@ -51,12 +51,18 @@ export function initRageshake() {
|
|||
}
|
||||
|
||||
window.mxSendRageshake = function(text: string, withLogs?: boolean) {
|
||||
const url = SdkConfig.get().bug_report_endpoint_url;
|
||||
if (!url) {
|
||||
console.error("Cannot send a rageshake - no bug_report_endpoint_url configured");
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
sendBugReport(SdkConfig.get().bug_report_endpoint_url, {
|
||||
sendBugReport(url, {
|
||||
userText: text,
|
||||
sendLogs: withLogs,
|
||||
progressCallback: console.log.bind(console),
|
||||
|
|
Loading…
Reference in a new issue