mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +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)))
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import Foundation
|
||||
import UIKit
|
||||
|
||||
struct BugReport: Equatable {
|
||||
let userID: String
|
||||
let userID: String?
|
||||
let deviceID: String?
|
||||
let text: String
|
||||
let includeLogs: Bool
|
||||
|
||||
Reference in New Issue
Block a user