The trust-link preference allows the user to ignore feed
entries that repeat a previously seen link URL.
Signed-off-by: George Saunders <georgesaunders@gmail.com>
# True: Receive one email per post.
# False: Receive an email every time a post changes.
('trust-guid', str(True)),
+ # True: Receive one email per unique link url.
+ # False: Defer to trust-guid preference.
+ ('trust-link', str(False)),
# To most correctly encode emails with international
# characters, we iterate through the list below and use the
# first character set that works.
'active',
'date_header',
'trust_guid',
+ 'trust_link',
'html_mail',
'use_css',
'unicode_snob',
def _get_entry_id(self, entry):
"""Get best ID from an entry."""
+ if self.trust_link:
+ return entry.get('link', None)
if self.trust_guid:
if getattr(entry, 'id', None):
# Newer versions of feedparser could return a dictionary