Add attachments to tag rss feed

main
Bob Mottram 2020-09-26 19:53:10 +01:00
parent aa42b423bd
commit b9d57a510c
1 changed files with 6 additions and 0 deletions

View File

@ -946,6 +946,12 @@ def rssHashtagSearch(nickname: str, domain: str, port: int,
'</description>' '</description>'
hashtagFeed += \ hashtagFeed += \
' <pubDate>' + rssDateStr + '</pubDate>' ' <pubDate>' + rssDateStr + '</pubDate>'
if postJsonObject['object'].get('attachment'):
for attach in postJsonObject['object']['attachment']:
if not attach.get('url'):
continue
hashtagFeed += \
' <link>' + attach['url'] + '</link>'
hashtagFeed += ' </item>' hashtagFeed += ' </item>'
index += 1 index += 1
if index >= maxFeedLength: if index >= maxFeedLength: