From 1dc4c72da2bed4ce59d56d332ae4d2f374559ccc Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 15 Jul 2021 13:01:36 -0400 Subject: [PATCH] only populate when first message wasn't checked previously --- internal/worker/notifications.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index 44b2dd5..e46f20c 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -291,7 +291,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) { } // Let's populate this with the latest message so we don't flood users with stuff - if account.LastMessageID == "" { + if account.LastMessageID == "" && account.LastCheckedAt == 0 { nc.logger.WithFields(logrus.Fields{ "accountID": delivery.Payload(), }).Debug("populating first message ID to prevent spamming")