mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 06:26:14 -06:00
Stub policy and standard
This commit is contained in:
parent
a8ae0e3173
commit
b9f759d922
3 changed files with 29 additions and 0 deletions
|
|
@ -32,6 +32,13 @@ type WebPushSubscription struct {
|
|||
|
||||
// Which alerts should be delivered to the endpoint.
|
||||
Alerts WebPushSubscriptionAlerts `json:"alerts"`
|
||||
|
||||
// Which accounts should generate notifications.
|
||||
Policy WebPushNotificationPolicy `json:"policy"`
|
||||
|
||||
// Whether the subscription uses RFC or pre-RFC Web Push standards.
|
||||
// For GotoSocial, this is always true.
|
||||
Standard bool `json:"standard"`
|
||||
}
|
||||
|
||||
// WebPushSubscriptionAlerts represents the specific events that this Web Push subscription will receive.
|
||||
|
|
@ -140,3 +147,11 @@ type WebPushSubscriptionRequestData struct {
|
|||
// Alerts selects the specific events that this Web Push subscription will receive.
|
||||
Alerts *WebPushSubscriptionAlerts `form:"-" json:"alerts"`
|
||||
}
|
||||
|
||||
// WebPushNotificationPolicy names sets of accounts that can generate notifications.
|
||||
type WebPushNotificationPolicy string
|
||||
|
||||
const (
|
||||
// WebPushNotificationPolicyAll allows all accounts to send notifications to the subscribing user.
|
||||
WebPushNotificationPolicyAll WebPushNotificationPolicy = "all"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue