aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 18:12:06 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 18:12:06 +0200
commitac568556e41231e07dd55b1d79675064ef4fed7b (patch)
tree14ca447e810c17a82797cb5da345e3cc63fb094d /internal/feed
parent63d20f3f7b02f33475049c12e03569a4f67fe810 (diff)
downloadfeed2imap-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.go8
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) {