Add experimental options to the Spaces beta

This commit is contained in:
Michael Telatynski 2021-06-16 09:01:13 +01:00
parent bef20dde48
commit b4fbc791bb
10 changed files with 203 additions and 48 deletions

View file

@ -263,7 +263,13 @@ function uint8ToString(buf: Buffer) {
return out;
}
export async function submitFeedback(endpoint: string, label: string, comment: string, canContact = false) {
export async function submitFeedback(
endpoint: string,
label: string,
comment: string,
canContact = false,
extraData: Record<string, string> = {},
) {
let version = "UNKNOWN";
try {
version = await PlatformPeg.get().getAppVersion();
@ -279,6 +285,10 @@ export async function submitFeedback(endpoint: string, label: string, comment: s
body.append("platform", PlatformPeg.get().getHumanReadableName());
body.append("user_id", MatrixClientPeg.get()?.getUserId());
for (const k in extraData) {
body.append(k, extraData[k]);
}
await _submitReport(SdkConfig.get().bug_report_endpoint_url, body, () => {});
}