From 17db3c4998d9a07eb2029c72e46b82899d87e7d9 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 13 Oct 2024 12:47:47 +0800 Subject: [PATCH] :bug: Fix APNs notification does not contains subtitle --- pkg/internal/services/postman.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/internal/services/postman.go b/pkg/internal/services/postman.go index 51acd0d..332dd5c 100644 --- a/pkg/internal/services/postman.go +++ b/pkg/internal/services/postman.go @@ -95,6 +95,9 @@ func PushAppleNotify(token string, in *proto.NotifyRequest) error { Custom("metadata", metadata). Sound("default"). MutableContent() + if in.Subtitle != nil { + data = data.AlertSubtitle(*in.Subtitle) + } if in.Avatar != nil { data = data.Custom("avatar", *in.Avatar) } @@ -118,7 +121,7 @@ func PushAppleNotify(token string, in *proto.NotifyRequest) error { Dur("elapsed", time.Since(start)). Str("reason", resp.Reason). Int("status", resp.StatusCode). - Msg("Push a notify via firebase") + Msg("Push a notify via apple") } return nil