mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix a crash when attempting to send a bug report with excessively large logs. (#4243)
* Alert the user when there are excessively large log files.
This commit is contained in:
@@ -80,8 +80,8 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
||||
params.append(MultipartFormData(key: "label", type: .text(value: label)))
|
||||
}
|
||||
|
||||
if bugReport.includeLogs {
|
||||
let logAttachments = await zipFiles(Tracing.logFiles)
|
||||
if let logFiles = bugReport.logFiles {
|
||||
let logAttachments = await zipFiles(logFiles)
|
||||
for url in logAttachments.files {
|
||||
params.append(MultipartFormData(key: "compressed-log", type: .file(url: url)))
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ struct BugReport: Equatable {
|
||||
let ed25519: String?
|
||||
let curve25519: String?
|
||||
let text: String
|
||||
let includeLogs: Bool
|
||||
let logFiles: [URL]?
|
||||
let canContact: Bool
|
||||
var githubLabels: [String]
|
||||
let files: [URL]
|
||||
|
||||
Reference in New Issue
Block a user