From 0b7faf08c0d4d914d3afa6901a60c9adca5ed885 Mon Sep 17 00:00:00 2001 From: lan Date: Sat, 9 May 2026 19:48:45 +0800 Subject: [PATCH] refactor(jpush): update IOS notification alert format to use map Change the `Alert` field in `IOSNotif` from a string to a map containing `title` and `body` to support structured notification content. --- internal/pkg/jpush/client.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/pkg/jpush/client.go b/internal/pkg/jpush/client.go index 2e32b68..d10b885 100644 --- a/internal/pkg/jpush/client.go +++ b/internal/pkg/jpush/client.go @@ -386,11 +386,13 @@ func BuildNotification(title, body string, notificationType string, extras map[s Priority: 1, }, IOS: &IOSNotif{ - Alert: body, - Sound: "default", - Badge: "+1", - MutableContent: true, - Extras: iosExtras, + Alert: map[string]any{ + "title": title, + "body": body, + }, + Sound: "default", + Badge: "+1", + Extras: iosExtras, }, } }