From a9f3f048ae084d093148f3d1b6a42673c0b005e8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 17 May 2020 10:44:42 +0100 Subject: [PATCH] Remove long words earlier --- posts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/posts.py b/posts.py index fba59947c..ac9bdabf3 100644 --- a/posts.py +++ b/posts.py @@ -3068,6 +3068,9 @@ def downloadAnnounce(session, baseDir: str, httpPrefix: str, if isFiltered(baseDir, nickname, domain, announcedJson['content']): rejectAnnounce(announceFilename) return None + # remove any long words + announcedJson['content'] = \ + removeLongWords(announcedJson['content'], 40, []) # wrap in create to be consistent with other posts announcedJson = \ @@ -3082,9 +3085,6 @@ 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'])