From 8502a67352c3f1774be562e55cff2b14692ed2aa Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sun, 1 May 2022 13:04:05 -0400 Subject: [PATCH] Change trending notification --- internal/worker/trending.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/worker/trending.go b/internal/worker/trending.go index b27a3bd..ff29662 100644 --- a/internal/worker/trending.go +++ b/internal/worker/trending.go @@ -38,7 +38,7 @@ type trendingWorker struct { watcherRepo domain.WatcherRepository } -const trendingNotificationTitleFormat = "🔥 Trending in r/%s" +const trendingNotificationTitleFormat = "🔥 r/%s Trending" func NewTrendingWorker(logger *logrus.Logger, statsd *statsd.Client, db *pgxpool.Pool, redis *redis.Client, queue rmq.Connection, consumers int) Worker { reddit := reddit.NewClient( @@ -318,10 +318,9 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) { func payloadFromTrendingPost(post *reddit.Thing) *payload.Payload { title := fmt.Sprintf(trendingNotificationTitleFormat, post.Subreddit) - payload := payload. + return payload. NewPayload(). AlertTitle(title). - AlertSubtitle(post.Title). AlertBody(post.Title). AlertSummaryArg(post.Subreddit). Category("post-watch"). @@ -332,6 +331,4 @@ func payloadFromTrendingPost(post *reddit.Thing) *payload.Payload { Custom("post_age", post.CreatedAt). MutableContent(). Sound("traloop.wav") - - return payload }