From 1fc769b2170d3d1b6f01fb69b06927b5104ddc3a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 May 2020 10:27:51 +0100 Subject: [PATCH] Remove long words from announced posts --- posts.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/posts.py b/posts.py index e2924aa4..fba59947 100644 --- a/posts.py +++ b/posts.py @@ -43,6 +43,7 @@ from capabilities import getOcapFilename from capabilities import capabilitiesUpdate from media import attachMedia from media import replaceYouTube +from content import removeLongWords from content import addHtmlTags from content import replaceEmojiFromTags from auth import createBasicAuthHeader @@ -3081,6 +3082,9 @@ def downloadAnnounce(session, baseDir: str, httpPrefix: str, # set the id to the original status announcedJson['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 attributedNickname = \ getNicknameFromActor(announcedJson['object']['id'])