From 5b06b2dccbd0264b6213c05d238a2f5ae218c2ef Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 8 Jun 2024 18:18:28 +0800 Subject: [PATCH] :bug: Fix APNs pushes no sound (again) --- .idea/workspace.xml | 6 +++--- pkg/services/notifications.go | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5500851..fa0d6ab 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,7 @@ - @@ -166,7 +165,8 @@ - true diff --git a/pkg/services/notifications.go b/pkg/services/notifications.go index 0394f17..43c76b0 100644 --- a/pkg/services/notifications.go +++ b/pkg/services/notifications.go @@ -113,7 +113,8 @@ func PushNotification(notification models.Notification) error { NewPayload(). AlertTitle(notification.Subject). AlertBody(notification.Content). - SoundName("default"). + Sound("default"). + Category(notification.Type). MarshalJSON() if err != nil { log.Warn().Err(err).Msg("An error occurred when preparing to notify subscriber via APNs...")