mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 07:28:28 +02:00
Merge branch 'develop' of https://github.com/vector-im/element-ios into langleyd/5292_refresh_tokens
This commit is contained in:
@@ -404,8 +404,8 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
}
|
||||
}
|
||||
|
||||
let msgType = event.content["msgtype"] as? String
|
||||
let messageContent = event.content["body"] as? String
|
||||
let msgType = event.content[kMXMessageTypeKey] as? String
|
||||
let messageContent = event.content[kMXMessageBodyKey] as? String
|
||||
let isReply = event.isReply()
|
||||
|
||||
if isReply {
|
||||
@@ -420,6 +420,11 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
break
|
||||
}
|
||||
|
||||
if event.location != nil {
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "LOCATION_FROM_USER", arguments: [eventSenderName])
|
||||
break
|
||||
}
|
||||
|
||||
switch msgType {
|
||||
case kMXMessageTypeEmote:
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "ACTION_FROM_USER", arguments: [eventSenderName, messageContent as Any])
|
||||
@@ -519,6 +524,9 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
additionalUserInfo = [Constants.userInfoKeyPresentNotificationOnForeground: true]
|
||||
}
|
||||
}
|
||||
case .pollStart:
|
||||
notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName)
|
||||
notificationBody = MXEventContentPollStart(fromJSON: event.content)?.question
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user