mirror of
https://github.com/idanoo/NZCovidBot
synced 2025-07-01 19:22:14 +00:00
Dont repost if updated with omicron
This commit is contained in:
parent
6e1c259d9e
commit
3b3dad749a
1 changed files with 0 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue