From 358ce08544a3b3f6befb1a0035edd5e2c7f2a934 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 11 Jun 2022 11:30:46 +0200 Subject: [PATCH] don't collapse gambling comments when viewing a comment --- files/classes/comment.py | 4 ++-- files/templates/comments.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 4e1156b79..8d81ad83b 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -428,7 +428,7 @@ class Comment(Base): if self.is_banned: return True - if path.startswith('/post') and (self.slots_result or self.blackjack_result or self.wordle_result) and (not self.body or len(self.body_html) <= 100) and 9 > self.level > 1: return True + if '?context' not in path and (self.slots_result or self.blackjack_result or self.wordle_result) and (not self.body or len(self.body_html) <= 100) and 9 > self.level > 1: return True if v and v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True @@ -528,4 +528,4 @@ class Comment(Base): body += f" Insured." body += '' - return body \ No newline at end of file + return body diff --git a/files/templates/comments.html b/files/templates/comments.html index 95e810d7d..078b4e47e 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -161,7 +161,7 @@ {% set isreply = False %} {% endif %} -
+
{% if not isreply %} {% endif %}