Remove long words from announced posts

main
Bob Mottram 2020-05-17 10:27:51 +01:00
parent aa289fda8a
commit 1fc769b217
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ from capabilities import getOcapFilename
from capabilities import capabilitiesUpdate from capabilities import capabilitiesUpdate
from media import attachMedia from media import attachMedia
from media import replaceYouTube from media import replaceYouTube
from content import removeLongWords
from content import addHtmlTags from content import addHtmlTags
from content import replaceEmojiFromTags from content import replaceEmojiFromTags
from auth import createBasicAuthHeader from auth import createBasicAuthHeader
@ -3081,6 +3082,9 @@ def downloadAnnounce(session, baseDir: str, httpPrefix: str,
# set the id to the original status # set the id to the original status
announcedJson['id'] = postJsonObject['object'] announcedJson['id'] = postJsonObject['object']
announcedJson['object']['id'] = postJsonObject['object'] announcedJson['object']['id'] = postJsonObject['object']
# remove any long words
announcedJson['content'] = \
removeLongWords(announcedJson['content'], 40, [])
# check that the repeat isn't for a blocked account # check that the repeat isn't for a blocked account
attributedNickname = \ attributedNickname = \
getNicknameFromActor(announcedJson['object']['id']) getNicknameFromActor(announcedJson['object']['id'])