mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Allow reporting a problem from the onboarding screen
This commit is contained in:
@@ -119,11 +119,14 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
||||
func submitBugReport(_ bugReport: BugReport,
|
||||
progressListener: CurrentValueSubject<Double, Never>) async -> Result<SubmitBugReportResponse, BugReportServiceError> {
|
||||
var params = [
|
||||
MultipartFormData(key: "user_id", type: .text(value: bugReport.userID)),
|
||||
MultipartFormData(key: "text", type: .text(value: bugReport.text)),
|
||||
MultipartFormData(key: "can_contact", type: .text(value: "\(bugReport.canContact)"))
|
||||
]
|
||||
|
||||
if let userID = bugReport.userID {
|
||||
params.append(.init(key: "user_id", type: .text(value: userID)))
|
||||
}
|
||||
|
||||
if let deviceID = bugReport.deviceID {
|
||||
params.append(.init(key: "device_id", type: .text(value: deviceID)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user