Add push notifications

This commit is contained in:
Christoph Hagen
2025-02-18 22:05:19 +01:00
parent de6f474aea
commit 66a40e52a0
9 changed files with 285 additions and 4 deletions

View File

@ -0,0 +1,21 @@
struct NotificationRequest {
let accessToken: String
/// The notificiations in the available languages
let notifications: [String : WebNotification]
init(accessToken: String, notifications: [String : WebNotification]) {
self.accessToken = accessToken
self.notifications = notifications
}
func notification(for language: String) -> WebNotification? {
notifications[language] ?? notifications["en"]
}
}
extension NotificationRequest: Codable {
}