diff --git a/Signal/src/UserInterface/Notifications/LegacyNotificationsAdaptee.swift b/Signal/src/UserInterface/Notifications/LegacyNotificationsAdaptee.swift index 9b2bb4429..5ec257521 100644 --- a/Signal/src/UserInterface/Notifications/LegacyNotificationsAdaptee.swift +++ b/Signal/src/UserInterface/Notifications/LegacyNotificationsAdaptee.swift @@ -156,6 +156,7 @@ extension LegacyNotificationPresenterAdaptee: NotificationPresenterAdaptee { let alertBody: String if let title = title { + // TODO - Make this a format string for better l10n alertBody = title.rtlSafeAppend(":").rtlSafeAppend(" ").rtlSafeAppend(body) } else { alertBody = body @@ -163,7 +164,7 @@ extension LegacyNotificationPresenterAdaptee: NotificationPresenterAdaptee { let notification = UILocalNotification() notification.category = category.identifier - notification.alertBody = alertBody + notification.alertBody = alertBody.filterForDisplay notification.userInfo = userInfo notification.soundName = sound?.filename diff --git a/Signal/src/UserInterface/Notifications/UserNotificationsAdaptee.swift b/Signal/src/UserInterface/Notifications/UserNotificationsAdaptee.swift index b9f1cddbf..6b037c8aa 100644 --- a/Signal/src/UserInterface/Notifications/UserNotificationsAdaptee.swift +++ b/Signal/src/UserInterface/Notifications/UserNotificationsAdaptee.swift @@ -132,10 +132,12 @@ extension UserNotificationPresenterAdaptee: NotificationPresenterAdaptee { } if shouldPresentNotification(category: category, userInfo: userInfo) { - if let title = title { - content.title = title + if let displayableTitle = title?.filterForDisplay { + content.title = displayableTitle + } + if let displayableBody = body.filterForDisplay { + content.body = displayableBody } - content.body = body } else { // Play sound and vibrate, but without a `body` no banner will show. Logger.debug("supressing notification body")