From ac568556e41231e07dd55b1d79675064ef4fed7b Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 26 Apr 2020 18:12:06 +0200 Subject: Fix logic in `similarTo` --- internal/feed/cache_v1.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/feed') diff --git a/internal/feed/cache_v1.go b/internal/feed/cache_v1.go index fb16027..45182dc 100644 --- a/internal/feed/cache_v1.go +++ b/internal/feed/cache_v1.go @@ -159,10 +159,10 @@ func newCachedItem(item feeditem) cachedItem { } func (item *cachedItem) similarTo(other *cachedItem, ignoreHash bool) bool { - return other.Title == item.Title || - other.Link == item.Link || - other.PublishedDate.Equal(item.PublishedDate) || - (!ignoreHash && other.Hash == item.Hash) + return other.Title == item.Title && + other.Link == item.Link && + other.PublishedDate.Equal(item.PublishedDate) && + (ignoreHash || other.Hash == item.Hash) } func (cf *cachedFeed) deleteItem(index int) { -- cgit v1.2.3-70-g09d2