Add push notification body for poll.end

This commit is contained in:
Alfonso Grillo 2022-12-30 09:54:22 +01:00
parent 7a3fe14963
commit 5893d516fb

View file

@ -561,14 +561,19 @@ class NotificationService: UNNotificationServiceExtension {
additionalUserInfo = [Constants.userInfoKeyPresentNotificationOnForeground: true] additionalUserInfo = [Constants.userInfoKeyPresentNotificationOnForeground: true]
} }
} }
case .pollStart: case .pollStart:
notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName) notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName)
notificationBody = MXEventContentPollStart(fromJSON: event.content)?.question notificationBody = MXEventContentPollStart(fromJSON: event.content)?.question
case .pollEnd:
notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName)
notificationBody = VectorL10n.pollTimelineEndedText
default: default:
break break
} }
self.validateNotificationContentAndComplete( self.validateNotificationContentAndComplete(
notificationTitle: notificationTitle, notificationTitle: notificationTitle,
notificationBody: notificationBody, notificationBody: notificationBody,