From 7a8108e10688d6a9601abf869bf8da88ae3cc12a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 3 Apr 2022 22:16:54 +0200 Subject: [PATCH] fsd --- files/routes/comments.py | 2 +- files/routes/front.py | 2 +- files/routes/posts.py | 3 ++- files/templates/comments.html | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 594938763..a871e79b5 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -198,7 +198,7 @@ def api_comment(v): body = request.values.get("body", "").strip()[:10000] - if v.admin_level > 1 and parent_post.id == 37749 and level == 1: + if v.admin_level > 2 and parent_post.id == 37749 and level == 1: with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f: f.write('\n{[para]}\n' + body) diff --git a/files/routes/front.py b/files/routes/front.py index d83a3bab4..a6e44e729 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -122,7 +122,7 @@ def notifications(v): x.voted = 1 if x not in c.replies2: c.replies2.append(x) - if c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment in comments): + if c.parent_comment and c.parent_comment.author_id == v.id: parent = c.parent_comment if parent.replies2 == None: parent.replies2 = [c] elif c not in parent.replies2: parent.replies2.append(c) diff --git a/files/routes/posts.py b/files/routes/posts.py index 1f64ff55f..ce17adc5f 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1281,8 +1281,9 @@ def submit_post(v, sub=None): if body.startswith('!slots1000'): check_for_slots_command(body, snappy, c) + g.db.flush() post.comment_count += 1 - if len(body_html) < 40000: post.replies = [c] + post.replies = [c] v.post_count = g.db.query(Submission.id).filter_by(author_id=v.id, is_banned=False, deleted_utc=0).count() g.db.add(v) diff --git a/files/templates/comments.html b/files/templates/comments.html index 17c702ff0..2e43af1b5 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -279,7 +279,7 @@ } .comment-{{c.id}}-only { animation-name: c{{c.id}}-tilt !important; - animation-duration: 60s !important; + animation-duration: 30s !important; animation-iteration-count: infinite !important; animation-direction: alternate !important; animation-timing-function: linear !important;