mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add a few more labels when sending a rageshake. (#4284)
This commit is contained in:
@@ -97,17 +97,16 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
|||||||
// Continue anyway without the screenshot.
|
// Continue anyway without the screenshot.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let ed25519 = await clientProxy?.ed25519Base64()
|
|
||||||
let curve25519 = await clientProxy?.curve25519Base64()
|
let bugReport = await BugReport(userID: clientProxy?.userID,
|
||||||
let bugReport = BugReport(userID: clientProxy?.userID,
|
deviceID: clientProxy?.deviceID,
|
||||||
deviceID: clientProxy?.deviceID,
|
ed25519: clientProxy?.ed25519Base64(),
|
||||||
ed25519: ed25519,
|
curve25519: clientProxy?.curve25519Base64(),
|
||||||
curve25519: curve25519,
|
text: context.reportText,
|
||||||
text: context.reportText,
|
logFiles: context.sendingLogsEnabled ? logFiles : nil,
|
||||||
logFiles: context.sendingLogsEnabled ? logFiles : nil,
|
canContact: context.canContact,
|
||||||
canContact: context.canContact,
|
githubLabels: [],
|
||||||
githubLabels: [],
|
files: files)
|
||||||
files: files)
|
|
||||||
|
|
||||||
switch await bugReportService.submitBugReport(bugReport,
|
switch await bugReportService.submitBugReport(bugReport,
|
||||||
progressListener: progressSubject) {
|
progressListener: progressSubject) {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
|||||||
fatalError("No bug report URL set, the screen should not be shown in this case.")
|
fatalError("No bug report URL set, the screen should not be shown in this case.")
|
||||||
}
|
}
|
||||||
|
|
||||||
let bugReport = appHooks.bugReportHook.update(bugReport)
|
var bugReport = appHooks.bugReportHook.update(bugReport)
|
||||||
|
|
||||||
var params = [
|
var params = [
|
||||||
MultipartFormData(key: "text", type: .text(value: bugReport.text)),
|
MultipartFormData(key: "text", type: .text(value: bugReport.text)),
|
||||||
@@ -77,6 +77,8 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
|||||||
|
|
||||||
if let userID = bugReport.userID {
|
if let userID = bugReport.userID {
|
||||||
params.append(.init(key: "user_id", type: .text(value: userID)))
|
params.append(.init(key: "user_id", type: .text(value: userID)))
|
||||||
|
} else {
|
||||||
|
bugReport.githubLabels.append("login")
|
||||||
}
|
}
|
||||||
|
|
||||||
if let deviceID = bugReport.deviceID {
|
if let deviceID = bugReport.deviceID {
|
||||||
@@ -88,8 +90,17 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
|||||||
params.append(.init(key: "device_keys", type: .text(value: compactKeys)))
|
params.append(.init(key: "device_keys", type: .text(value: compactKeys)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let crashEventID = lastCrashEventID {
|
||||||
|
params.append(MultipartFormData(key: "crash_report", type: .text(value: "<https://sentry.tools.element.io/organizations/element/issues/?project=44&query=\(crashEventID)>")))
|
||||||
|
bugReport.githubLabels.append("crash")
|
||||||
|
}
|
||||||
|
|
||||||
params.append(contentsOf: defaultParams)
|
params.append(contentsOf: defaultParams)
|
||||||
|
|
||||||
|
if InfoPlistReader.main.baseBundleIdentifier == "io.element.elementx.nightly" {
|
||||||
|
bugReport.githubLabels.append("Nightly")
|
||||||
|
}
|
||||||
|
|
||||||
for label in bugReport.githubLabels {
|
for label in bugReport.githubLabels {
|
||||||
params.append(MultipartFormData(key: "label", type: .text(value: label)))
|
params.append(MultipartFormData(key: "label", type: .text(value: label)))
|
||||||
}
|
}
|
||||||
@@ -101,10 +112,6 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let crashEventID = lastCrashEventID {
|
|
||||||
params.append(MultipartFormData(key: "crash_report", type: .text(value: "<https://sentry.tools.element.io/organizations/element/issues/?project=44&query=\(crashEventID)>")))
|
|
||||||
}
|
|
||||||
|
|
||||||
for url in bugReport.files {
|
for url in bugReport.files {
|
||||||
params.append(MultipartFormData(key: "file", type: .file(url: url)))
|
params.append(MultipartFormData(key: "file", type: .file(url: url)))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
Submodule Enterprise updated: 0c0b8ae6bc...233f49aa20
Reference in New Issue
Block a user