only populate when first message wasn't checked previously

This commit is contained in:
Andre Medeiros 2021-07-15 13:01:36 -04:00
parent 412bc04d77
commit 1dc4c72da2

View file

@ -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")