Duplicate permitted outbox types

merge-requests/30/head
Bob Mottram 2021-07-04 12:02:08 +01:00
parent bc679d8b0a
commit 751a0f1f02
2 changed files with 7 additions and 6 deletions

View File

@ -818,8 +818,9 @@ def getRSSfromDict(baseDir: str, newswire: {},
except Exception as e:
print('WARN: Unable to convert date ' + published + ' ' + str(e))
continue
rssStr += '<item>\n'
rssStr += ' <title>' + fields[0] + '</title>\n'
rssStr += \
'<item>\n' + \
' <title>' + fields[0] + '</title>\n'
description = removeHtml(firstParagraphFromString(fields[4]))
rssStr += ' <description>' + description + '</description>\n'
url = fields[1]
@ -829,8 +830,9 @@ def getRSSfromDict(baseDir: str, newswire: {},
rssStr += ' <link>' + url + '</link>\n'
rssDateStr = pubDate.strftime("%a, %d %b %Y %H:%M:%S UT")
rssStr += ' <pubDate>' + rssDateStr + '</pubDate>\n'
rssStr += '</item>\n'
rssStr += \
' <pubDate>' + rssDateStr + '</pubDate>\n' + \
'</item>\n'
rssStr += rss2Footer()
return rssStr

View File

@ -311,8 +311,7 @@ def postMessageToOutbox(session, translate: {},
permittedOutboxTypes = ('Create', 'Announce', 'Like', 'Follow', 'Undo',
'Update', 'Add', 'Remove', 'Block', 'Delete',
'Skill', 'Add', 'Remove', 'Event',
'Ignore')
'Skill', 'Ignore')
if messageJson['type'] not in permittedOutboxTypes:
if debug:
print('DEBUG: POST to outbox - ' + messageJson['type'] +