add comment_id on username mention

This commit is contained in:
Andre Medeiros 2022-05-01 13:22:18 -04:00
parent 91456dc9b9
commit c2a77e7c66

View file

@ -422,7 +422,10 @@ func payloadFromMessage(acct domain.Account, msg *reddit.Thing, badgeCount int)
switch { switch {
case (msg.Kind == "t1" && msg.Type == "username_mention"): case (msg.Kind == "t1" && msg.Type == "username_mention"):
title := fmt.Sprintf(usernameMentionNotificationTitleFormat, postTitle) title := fmt.Sprintf(usernameMentionNotificationTitleFormat, postTitle)
payload = payload.AlertTitle(title).Custom("type", "username") payload = payload.
AlertTitle(title).
Custom("comment_id", msg.ID).
Custom("type", "username")
pType, _ := reddit.SplitID(msg.ParentID) pType, _ := reddit.SplitID(msg.ParentID)
if pType == "t1" { if pType == "t1" {