fix: notification title fix

This commit is contained in:
Krispire Admin
2026-06-08 18:33:33 +05:30
parent 26f0e298b5
commit e79f347197
+8 -2
View File
@@ -220,17 +220,23 @@ func (s *NotificationService) publishPush(ctx context.Context, recipientID, kind
who = actorDisplay(actor)
url = s.frontendURL + "/u/" + actor.Handle
}
var body string
// Title must be meaningful, not the app name: iOS renders installed-PWA
// notifications as "<title> from <app name>", so a generic "Prabhupāda
// Says" title reads as "Prabhupāda Says from Prabhupāda Says".
var title, body string
switch kind {
case NotifFollowRequest:
title = "New Friend Request"
body = who + " requested to follow you"
case NotifFollowAccepted:
title = "Friend Request Accepted"
body = who + " accepted your follow request"
default:
title = "New notification"
body = "You have a new notification"
}
s.push.SendToUser(ctx, recipientID, PushPayload{
Title: "Prabhupāda Says",
Title: title,
Body: body,
URL: url,
Tag: kind,