mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-23 05:56:30 +00:00
26 lines
585 B
Swift
26 lines
585 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
struct PushSubscription: Codable {
|
|
struct Alerts: Codable, Hashable {
|
|
var follow: Bool
|
|
var favourite: Bool
|
|
var reblog: Bool
|
|
var mention: Bool
|
|
@DecodableDefault.True var poll: Bool
|
|
}
|
|
|
|
let endpoint: URL
|
|
let alerts: Alerts
|
|
let serverKey: String
|
|
}
|
|
|
|
extension PushSubscription.Alerts {
|
|
static let initial: Self = Self(
|
|
follow: true,
|
|
favourite: true,
|
|
reblog: true,
|
|
mention: true,
|
|
poll: DecodableDefault.True())
|
|
}
|