🐛 Fix APNs pushes no sound (again)

This commit is contained in:
LittleSheep 2024-06-08 18:18:28 +08:00
parent 3010d4f2a4
commit 5b06b2dccb
2 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Bug fixes on notification badges for APNs">
<list default="true" id="3fefb2c4-b6f9-466b-a523-53352e8d6f95" name="更改" comment=":bug: Fix APNs pushes no sound">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pkg/services/notifications.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/services/notifications.go" afterDir="false" />
</list>
@ -141,7 +141,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value=":sparkles: Realm Member GRPC" />
<MESSAGE value=":bug: Bug fixes on forgot add realm members for account" />
<MESSAGE value=":bug: Bug fix on missing id in realm" />
<MESSAGE value=":bug: Bug fixes on realm missing member on creation" />
@ -166,7 +165,8 @@
<MESSAGE value=":bug: Bug fix and fix" />
<MESSAGE value=":bug: Fix APNs non-production" />
<MESSAGE value=":bug: Bug fixes on notification badges for APNs" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Bug fixes on notification badges for APNs" />
<MESSAGE value=":bug: Fix APNs pushes no sound" />
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix APNs pushes no sound" />
</component>
<component name="VgoProject">
<settings-migrated>true</settings-migrated>

View File

@ -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...")