mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 11:47:42 +00:00
include subreddit fields too
This commit is contained in:
parent
c2a77e7c66
commit
e48460572a
1 changed files with 5 additions and 0 deletions
|
@ -422,9 +422,12 @@ func payloadFromMessage(acct domain.Account, msg *reddit.Thing, badgeCount int)
|
|||
switch {
|
||||
case (msg.Kind == "t1" && msg.Type == "username_mention"):
|
||||
title := fmt.Sprintf(usernameMentionNotificationTitleFormat, postTitle)
|
||||
postID := reddit.PostIDFromContext(msg.Context)
|
||||
payload = payload.
|
||||
AlertTitle(title).
|
||||
Custom("comment_id", msg.ID).
|
||||
Custom("post_id", postID).
|
||||
Custom("subreddit", msg.Subreddit).
|
||||
Custom("type", "username")
|
||||
|
||||
pType, _ := reddit.SplitID(msg.ParentID)
|
||||
|
@ -444,6 +447,7 @@ func payloadFromMessage(acct domain.Account, msg *reddit.Thing, badgeCount int)
|
|||
Custom("comment_id", msg.ID).
|
||||
Custom("post_id", postID).
|
||||
Custom("subject", "comment").
|
||||
Custom("subreddit", msg.Subreddit).
|
||||
Custom("type", "post").
|
||||
ThreadID("comment")
|
||||
case (msg.Kind == "t1" && msg.Type == "comment_reply"):
|
||||
|
@ -455,6 +459,7 @@ func payloadFromMessage(acct domain.Account, msg *reddit.Thing, badgeCount int)
|
|||
Custom("comment_id", msg.ID).
|
||||
Custom("post_id", postID).
|
||||
Custom("subject", "comment").
|
||||
Custom("subreddit", msg.Subreddit).
|
||||
Custom("type", "comment").
|
||||
ThreadID("comment")
|
||||
case (msg.Kind == "t4"):
|
||||
|
|
Loading…
Reference in a new issue