2020-08-12 09:24:39 +02:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
struct PushSubscription: Codable {
|
|
|
|
struct Alerts: Codable, Hashable {
|
|
|
|
let follow: Bool
|
|
|
|
let favourite: Bool
|
|
|
|
let reblog: Bool
|
|
|
|
let mention: Bool
|
|
|
|
let poll: Bool
|
|
|
|
}
|
|
|
|
|
|
|
|
let endpoint: URL
|
|
|
|
let alerts: Alerts
|
|
|
|
let serverKey: String
|
|
|
|
}
|
2020-08-14 03:24:53 +02:00
|
|
|
|
|
|
|
extension PushSubscription.Alerts {
|
|
|
|
static let initial: Self = Self(follow: true, favourite: true, reblog: true, mention: true, poll: true)
|
|
|
|
}
|