mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
don't spam
This commit is contained in:
parent
f83ce540b1
commit
771e0e221e
1 changed files with 6 additions and 0 deletions
|
@ -103,6 +103,12 @@ func accountWorker(id int, rc *reddit.Client, db *sql.DB, logger *log.Logger, qu
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// If no latest message recorded, we're not going to notify on every message. Remember that and move on.
|
||||
if account.LastMessageID == "" {
|
||||
tx.Commit()
|
||||
continue
|
||||
}
|
||||
|
||||
devices := []string{}
|
||||
query = `
|
||||
SELECT apns_token FROM devices
|
||||
|
|
Loading…
Reference in a new issue