mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Add voice message notification body.
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
/* New audio message from a specific person, not referencing a room. */
|
||||
"AUDIO_FROM_USER" = "%@ sent an audio file %@";
|
||||
|
||||
/* New voice message from a specific person, not referencing a room. */
|
||||
"VOICE_MESSAGE_FROM_USER" = "%@ sent a voice message";
|
||||
|
||||
/* New file message from a specific person, not referencing a room. */
|
||||
"FILE_FROM_USER" = "%@ sent a file %@";
|
||||
|
||||
|
||||
@@ -383,7 +383,11 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
case kMXMessageTypeVideo:
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "VIDEO_FROM_USER", arguments: [eventSenderName, messageContent as Any])
|
||||
case kMXMessageTypeAudio:
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "AUDIO_FROM_USER", arguments: [eventSenderName, messageContent as Any])
|
||||
if event.isVoiceMessage() {
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "VOICE_MESSAGE_FROM_USER", arguments: [eventSenderName])
|
||||
} else {
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "AUDIO_FROM_USER", arguments: [eventSenderName, messageContent as Any])
|
||||
}
|
||||
case kMXMessageTypeFile:
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "FILE_FROM_USER", arguments: [eventSenderName, messageContent as Any])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user