mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
a2f1f36d2c
Fixed an issue where receiving a PN for outgoing messages could break the NotificationServiceExtension Fixed an issue where the NotificationServiceExtension could startup in an invalid way resulting in subsequent PNs failing to process Fixed an issue where you could incorrectly receive multiple generic notifications after receiving an incoming call notification Fixed an issue where the read state syncing might not clear notifications from the notification center Fixed an issue with parsing Bencoded data Updated the PN subscription to subscribe to CONVO_INFO_VOLATILE notifications (update read state) Updated the NotificationServiceExtension to use standard message processing where possible Updated the NotificationServiceExtension to update the app badge based on a database query
18 lines
624 B
Swift
18 lines
624 B
Swift
// Copyright © 2023 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
import SessionMessagingKit
|
|
|
|
enum NotificationError: LocalizedError {
|
|
case processing(PushNotificationAPI.ProcessResult)
|
|
case messageProcessing
|
|
case messageHandling(MessageReceiverError)
|
|
|
|
public var errorDescription: String? {
|
|
switch self {
|
|
case .processing(let result): return "Failed to process notification (\(result))"
|
|
case .messageProcessing: return "Failed to process message"
|
|
case .messageHandling(let error): return "Failed to handle message (\(error))"
|
|
}
|
|
}
|
|
}
|