Fixed a bug where all 1000 last notices where recognized as 'new'. This was caused by ApiEndpoint.getNotices() returning time.Time{} and a nil error in some cases.

This commit is contained in:
Julian Müller (ChaoticByte) 2023-10-18 20:17:27 +02:00
parent 57b26240fc
commit 740862efa2
2 changed files with 7 additions and 7 deletions

View file

@ -85,7 +85,7 @@ func main() {
// ok then...
logger.error("Couldn't query notices from API endpoint '" + a.Id + "'")
logger.error(err)
} else {
} else if len(n) > 0 {
newNotices = append(newNotices, n...)
persistent.data.(PersistentData).LastPublished[a.Id] = t
persistent.save()