From b886dd3fab0021e5ad1cdddd93a883247d62fe50 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sun, 1 May 2022 13:18:16 -0400 Subject: [PATCH] Fix post reply notifications --- internal/worker/notifications.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index 3107d10..7102d26 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -434,10 +434,12 @@ func payloadFromMessage(acct domain.Account, msg *reddit.Thing, badgeCount int) payload = payload.Custom("subject", "comment").ThreadID("comment") case (msg.Kind == "t1" && msg.Type == "post_reply"): title := fmt.Sprintf(postReplyNotificationTitleFormat, msg.Author, postTitle) + postID := reddit.PostIDFromContext(msg.Context) payload = payload. AlertTitle(title). Category("inbox-post-reply"). - Custom("post_id", msg.ID). + Custom("comment_id", msg.ID). + Custom("post_id", postID). Custom("subject", "comment"). Custom("type", "post"). ThreadID("comment")