Revert "mentioned you improvement"

This reverts commit 0ecb156020.
This commit is contained in:
Mauro Romito
2023-11-22 13:49:56 +01:00
parent 0ecb156020
commit 7b8f4f8276
3 changed files with 28 additions and 36 deletions
+11 -2
View File
@@ -101,8 +101,17 @@ struct NotificationContentBuilder {
let displayName = notificationItem.senderDisplayName ?? notificationItem.roomDisplayName
let message = String(messageEventStringBuilder.buildAttributedString(for: messageType, senderDisplayName: displayName, prefixWithSenderName: false).characters)
notification.body = notificationItem.hasMention ? L10n.notificationMentionedYouBody(message) : message
let body: String
if notificationItem.hasMention {
if let senderDisplayName = notificationItem.senderDisplayName {
body = L10n.notificationMentionedYouBody(senderDisplayName, message)
} else {
body = L10n.notificationMentionedYouFallbackBody(message)
}
} else {
body = message
}
notification.body = body
switch messageType {
case .image(content: let content):