diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-26 18:12:06 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-26 18:12:06 +0200 |
commit | ac568556e41231e07dd55b1d79675064ef4fed7b (patch) | |
tree | 14ca447e810c17a82797cb5da345e3cc63fb094d /internal/feed | |
parent | 63d20f3f7b02f33475049c12e03569a4f67fe810 (diff) | |
download | feed2imap-go-ac568556e41231e07dd55b1d79675064ef4fed7b.tar.gz feed2imap-go-ac568556e41231e07dd55b1d79675064ef4fed7b.tar.bz2 feed2imap-go-ac568556e41231e07dd55b1d79675064ef4fed7b.zip |
Fix logic in `similarTo`
Diffstat (limited to 'internal/feed')
-rw-r--r-- | internal/feed/cache_v1.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) { |