fix: notification title fix
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user