mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-23 08:54:22 +01:00
Payload compatibility for Expo Notifications (#572)
This commit is contained in:
@@ -60,11 +60,12 @@ open class SDKNotificationService: UNNotificationServiceExtension {
|
||||
|
||||
open func getTaskFromNotification() -> TaskProtocol? {
|
||||
guard let content = bestAttemptContent else { return nil }
|
||||
guard let notificationType = content.userInfo[Constants.MESSAGE_DATA_TYPE] as? String else { return nil }
|
||||
let userInfo = content.userInfo["body"] as? NSDictionary ?? content.userInfo as NSDictionary
|
||||
guard let notificationType = userInfo[Constants.MESSAGE_DATA_TYPE] as? String else { return nil }
|
||||
self.logger.log(tag: TAG, line: "Notification payload: \(content.userInfo)", level: "INFO")
|
||||
self.logger.log(tag: TAG, line: "Notification type: \(notificationType)", level: "INFO")
|
||||
|
||||
guard let payload = content.userInfo[Constants.MESSAGE_DATA_PAYLOAD] as? String else {
|
||||
guard let payload = userInfo[Constants.MESSAGE_DATA_PAYLOAD] as? String else {
|
||||
contentHandler!(content)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user