Skip to content
Snippets Groups Projects
Commit 80bbc8bf authored by Bruno Muniz's avatar Bruno Muniz :apple:
Browse files

fixed notifications

parent 11dea3d8
No related branches found
No related tags found
1 merge request!66Using new client wrapper
......@@ -28,17 +28,14 @@ public extension PushExtractor {
return .success(nil)
}
do {
let report = try messenger.getNotificationReport(notificationCSV: csv)
guard report.forMe,
report.type != .silent,
report.type != .default
else {
return .success(nil)
}
return .success([Push(
type: report.type,
source: report.source
)])
let reports = try messenger.getNotificationReports(notificationCSV: csv)
return .success(
reports
.filter { $0.forMe }
.filter { $0.type != .silent }
.filter { $0.type != .default }
.map { Push(type: $0.type, source: $0.source) }
)
} catch {
return .failure(error)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment