From 36b370dd14216686826c024eef6c4bced6e64702 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Fri, 14 Oct 2022 06:19:47 -0700 Subject: [PATCH] use comment length for snappy, not post --- files/helpers/actions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 4bd3694a4..ff98459c7 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -135,17 +135,17 @@ def execute_snappy(post, v): addition += f'* [archive.org](https://web.archive.org/{href})\n' addition += f'* [archive.ph](https://archive.ph/?url={quote(href)}&run=1) (click to archive)\n' addition += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)}) (click to archive)\n\n' - if len(f'{body}{addition}') > 10000: break + if len(f'{body}{addition}') > COMMENT_BODY_LENGTH_LIMIT: break body += addition archive_url(href) - body = body.strip()[:POST_BODY_LENGTH_LIMIT] + body = body.strip()[:COMMENT_BODY_LENGTH_LIMIT] body_html = sanitize(body) if len(body_html) == 0: return - if len(body_html) < POST_BODY_HTML_LENGTH_LIMIT: + if len(body_html) < COMMENT_BODY_HTML_LENGTH_LIMIT: c = Comment(author_id=SNAPPY_ID, distinguish_level=6, parent_submission=post.id,