Implement push subscription API

This commit is contained in:
Vyr Cossont 2024-11-30 20:13:06 -08:00
commit 8b9a228ea2
26 changed files with 2084 additions and 101 deletions

View file

@ -101,7 +101,7 @@ func (r *realSender) Send(
case gtsmodel.NotificationAdminReport:
notify = *subscription.NotifyAdminReport
case gtsmodel.NotificationPendingFave:
notify = *subscription.NotifyPendingFave
notify = *subscription.NotifyPendingFavourite
case gtsmodel.NotificationPendingReply:
notify = *subscription.NotifyPendingReply
case gtsmodel.NotificationPendingReblog:
@ -174,7 +174,7 @@ func (r *realSender) sendToSubscription(
}
// Create push notification payload struct.
pushNotification := &apimodel.PushNotification{
pushNotification := &apimodel.WebPushNotification{
NotificationID: apiNotification.ID,
NotificationType: apiNotification.Type,
Icon: apiNotification.Account.Avatar,