From fddbb1f2f8133ee12048b580ba8fe4cb822b06ae Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 26 Sep 2020 19:45:25 +0100 Subject: [PATCH] Include post content in hashtag feed --- webinterface.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/webinterface.py b/webinterface.py index f9942ebb..598d9967 100644 --- a/webinterface.py +++ b/webinterface.py @@ -924,16 +924,21 @@ def rssHashtagSearch(nickname: str, domain: str, port: int, break continue # add to feed - if postJsonObject['object'].get('id') and \ + if postJsonObject['object'].get('content') and \ postJsonObject['object'].get('published'): - messageLink = \ - postJsonObject['object']['id'].replace('/statuses/', '/') published = postJsonObject['object']['published'] pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ") rssDateStr = pubDate.strftime("%a, %d %b %Y %H:%M:%S UT") hashtagFeed += ' ' + if postJsonObject['object'].get('summary'): + hashtagFeed += \ + ' ' + \ + postJsonObject['object']['summary'] + \ + '' hashtagFeed += \ - ' ' + messageLink + '' + ' ' + \ + postJsonObject['object']['content'] + \ + '' hashtagFeed += \ ' ' + rssDateStr + '' hashtagFeed += ' '