forked from indymedia/epicyon
Include post content in hashtag feed
parent
83ff1b03a3
commit
fddbb1f2f8
|
@ -924,16 +924,21 @@ def rssHashtagSearch(nickname: str, domain: str, port: int,
|
||||||
break
|
break
|
||||||
continue
|
continue
|
||||||
# add to feed
|
# add to feed
|
||||||
if postJsonObject['object'].get('id') and \
|
if postJsonObject['object'].get('content') and \
|
||||||
postJsonObject['object'].get('published'):
|
postJsonObject['object'].get('published'):
|
||||||
messageLink = \
|
|
||||||
postJsonObject['object']['id'].replace('/statuses/', '/')
|
|
||||||
published = postJsonObject['object']['published']
|
published = postJsonObject['object']['published']
|
||||||
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
|
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
|
||||||
rssDateStr = pubDate.strftime("%a, %d %b %Y %H:%M:%S UT")
|
rssDateStr = pubDate.strftime("%a, %d %b %Y %H:%M:%S UT")
|
||||||
hashtagFeed += ' <item>'
|
hashtagFeed += ' <item>'
|
||||||
|
if postJsonObject['object'].get('summary'):
|
||||||
hashtagFeed += \
|
hashtagFeed += \
|
||||||
' <link>' + messageLink + '</link>'
|
' <title>' + \
|
||||||
|
postJsonObject['object']['summary'] + \
|
||||||
|
'</title>'
|
||||||
|
hashtagFeed += \
|
||||||
|
' <description>' + \
|
||||||
|
postJsonObject['object']['content'] + \
|
||||||
|
'</description>'
|
||||||
hashtagFeed += \
|
hashtagFeed += \
|
||||||
' <pubDate>' + rssDateStr + '</pubDate>'
|
' <pubDate>' + rssDateStr + '</pubDate>'
|
||||||
hashtagFeed += ' </item>'
|
hashtagFeed += ' </item>'
|
||||||
|
|
Loading…
Reference in New Issue