mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
@@ -36,18 +36,20 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
UNUserNotificationCenter.current().removeUnwantedNotifications()
|
||||
|
||||
// check if this is a Matrix notification
|
||||
if let content = originalContent {
|
||||
let userInfo = content.userInfo
|
||||
NSLog("[NotificationService] Payload came: \(userInfo)")
|
||||
let roomId = userInfo["room_id"] as? String
|
||||
let eventId = userInfo["event_id"] as? String
|
||||
guard let content = originalContent else {
|
||||
return
|
||||
}
|
||||
|
||||
let userInfo = content.userInfo
|
||||
NSLog("[NotificationService] Payload came: \(userInfo)")
|
||||
let roomId = userInfo["room_id"] as? String
|
||||
let eventId = userInfo["event_id"] as? String
|
||||
|
||||
guard roomId != nil, eventId != nil else {
|
||||
// it's not a Matrix notification, do not change the content
|
||||
NSLog("[NotificationService] Fallback case 7")
|
||||
contentHandler(content)
|
||||
return
|
||||
}
|
||||
guard roomId != nil, eventId != nil else {
|
||||
// it's not a Matrix notification, do not change the content
|
||||
NSLog("[NotificationService] Fallback case 7")
|
||||
contentHandler(content)
|
||||
return
|
||||
}
|
||||
|
||||
// setup user account
|
||||
|
||||
Reference in New Issue
Block a user