From 46ae07413e9ba21ebe297db9f6301f9623a8041a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 5 Sep 2021 13:19:03 +0200 Subject: feeds: ... --- user-profiles/feeds/imm-notmuch-insert.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'user-profiles') diff --git a/user-profiles/feeds/imm-notmuch-insert.py b/user-profiles/feeds/imm-notmuch-insert.py index bd22fc85..b1965136 100644 --- a/user-profiles/feeds/imm-notmuch-insert.py +++ b/user-profiles/feeds/imm-notmuch-insert.py @@ -28,8 +28,13 @@ def main(): msg['Subject'] = callbackMessage['feed_item']['title'] msg['Item-Identifier'] = f"{callbackMessage['feed_item']['identifier']}" for link in callbackMessage['feed_item']['links']: - linkArgs={**link} - del linkArgs['uri'] + linkArgs={} + if 'relation' in link: + linkArgs['relation'] = link['relation'] + if 'type' in link: + linkArgs['type'] = link['type'] + if 'title' in link and link['title']: + linkArgs['title'] = link['title'] msg.add_header('Link', link['uri'], **linkArgs) date = None if 'date' in callbackMessage['feed_item']: -- cgit v1.2.3