diff --git a/files/classes/comment.py b/files/classes/comment.py index d6048630c..a60ba2742 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -160,8 +160,8 @@ class Comment(Base): @lazy def shortlink(self): if self.wall_user_id: - return f"/@{self.wall_user.username}/wall/comment/{self.id}?context=8#context" - return f"{self.post.shortlink}/{self.id}?context=8#context" + return f"/@{self.wall_user.username}/wall/comment/{self.id}#context" + return f"{self.post.shortlink}/{self.id}#context" @property @lazy diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 8cc873f78..8419a5528 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -59,7 +59,7 @@ class ModAction(Base): if self.target_user: return f'{self.target_user.username}' elif self.target_post: return censor_slurs(f'{self.target_post.title_html}', None) - elif self.target_comment_id: return f'comment' + elif self.target_comment_id: return f'comment' @property @lazy diff --git a/files/classes/sub_logs.py b/files/classes/sub_logs.py index 2aaca98fe..ef6840aee 100644 --- a/files/classes/sub_logs.py +++ b/files/classes/sub_logs.py @@ -51,7 +51,7 @@ class SubAction(Base): if self.target_user: return f'{self.target_user.username}' elif self.target_post: return censor_slurs(f'{self.target_post.title_html}', None) - elif self.target_comment_id: return f'comment' + elif self.target_comment_id: return f'comment' @property @lazy diff --git a/files/routes/awards.py b/files/routes/awards.py index f495fec36..47794e04b 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -217,7 +217,7 @@ def award_thing(v, thing_type, id): link = f"/{thing_type}/{thing.id}" link2 = link if thing_type == 'comment': - link2 += '?context=8' + link2 += '#context' ban_reason = f'1-Day ban award used by @{v.username} on {link}' if not author.is_suspended: author.ban(reason=ban_reason, days=1) diff --git a/files/routes/comments.py b/files/routes/comments.py index 37528214f..d3bc5e7af 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -51,8 +51,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): if v and v.client: abort(403, "This content is not suitable for some users and situations.") else: return render_template("errors/nsfw.html", v=v), 403 - try: context = min(int(request.values.get("context", 0)), 8) - except: context = 0 + try: context = min(int(request.values.get("context", 8)), 8) + except: context = 8 comment_info = comment c = comment while context and c.level > 1: @@ -307,7 +307,7 @@ def comment(v:User): if len(c.body) > PUSH_NOTIF_LIMIT: notifbody = c.body[:PUSH_NOTIF_LIMIT] + '...' else: notifbody = c.body - url = f'{SITE_FULL}/comment/{c.id}?context=8&read=true#context' + url = f'{SITE_FULL}/comment/{c.id}?read=true#context' push_notif(parent_user.id, title, notifbody, url) diff --git a/files/routes/subs.py b/files/routes/subs.py index 936ad91de..38f78072f 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -65,7 +65,7 @@ def exile_comment(v:User, cid): kind='exile_user', user_id=v.id, target_user_id=u.id, - _note=f'for comment' + _note=f'for comment' ) g.db.add(ma) diff --git a/files/routes/users.py b/files/routes/users.py index 5dbafc8f5..e837eac64 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -814,8 +814,8 @@ def u_username_wall_comment(v:User, username:str, cid): g.db.add(notif) g.db.commit() - try: context = min(int(request.values.get("context", 0)), 8) - except: context = 0 + try: context = min(int(request.values.get("context", 8)), 8) + except: context = 8 comment_info = comment c = comment while context and c.level > 1: