From 3b3dad749a701599a4f638ef3f494e8256c9b498 Mon Sep 17 00:00:00 2001 From: Daniel Mason Date: Sun, 23 Jan 2022 18:04:39 +1300 Subject: [PATCH] Dont repost if updated with omicron --- internal/nzcovidbot/api.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/nzcovidbot/api.go b/internal/nzcovidbot/api.go index 772e536..14a8c35 100644 --- a/internal/nzcovidbot/api.go +++ b/internal/nzcovidbot/api.go @@ -109,19 +109,6 @@ func getNewAPILocations() { if item.PublishedAt.After(newUpdatedTime) { newUpdatedTime = item.PublishedAt } - } else if item.UpdatedAt.After(previousUpdatedTime) { - if strings.Contains(strings.ToLower(item.PublicAdvice), "omicron") { - copy := item - // Apend Omicron if Omicron in advice - copy.EventName = copy.EventName + " (Omicron)" - locationParse := parseCity(item.Location.City) - newItems[locationParse] = append(newItems[locationParse], copy) - - // Always keep the latest - if item.UpdatedAt.After(newUpdatedTime) { - newUpdatedTime = item.UpdatedAt - } - } } }