From 69ada73dd4a4234aa375e7d782cf6632ba929120 Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Wed, 15 Jun 2022 11:13:05 +0200 Subject: [PATCH] cleanup rageshake code --- src/domain/rageshake.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/domain/rageshake.ts b/src/domain/rageshake.ts index b1468bf5..a1f3fd39 100644 --- a/src/domain/rageshake.ts +++ b/src/domain/rageshake.ts @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import {encodeBody} from "../matrix/net/common"; - import type {BlobHandle} from "../platform/web/dom/BlobHandle"; import type {RequestFunction} from "../platform/types/types"; @@ -45,13 +43,11 @@ export async function submitLogsToRageshakeServer(data: RageshakeData, logsBlob: formData.set("label", data.label); } formData.set("file", {name: "logs.json", blob: logsBlob}); - const encoded = encodeBody(formData); const headers: Map = new Map(); headers.set("Accept", "application/json"); - //headers.set("Content-Type", encoded.mimeType); const result = request(submitUrl, { method: "POST", - body: encoded.body, + body: formData, headers }); let response; @@ -64,4 +60,6 @@ export async function submitLogsToRageshakeServer(data: RageshakeData, logsBlob: if (status < 200 || status >= 300) { throw new Error(`Could not submit logs to ${submitUrl}, got status code ${status} with body ${body}`); } + // we don't bother with reading report_url from the body as the rageshake server doesn't always return it + // and would have to have CORS setup properly for us to be able to read it. }