🐛 Fix APNs notification does not contains subtitle

This commit is contained in:
LittleSheep 2024-10-13 12:47:47 +08:00
parent fed972fc16
commit 17db3c4998

View File

@ -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