From 169dc4ebef3ba661df23b1557be7973ed106a023 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 20 Dec 2022 05:05:13 +0200 Subject: [PATCH] remove #context in links --- files/classes/comment.py | 6 +++--- files/classes/mod_logs.py | 2 +- files/classes/sub_logs.py | 2 +- files/routes/awards.py | 2 +- files/routes/comments.py | 4 ++-- files/routes/subs.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index b2ac580cb3..19a99eef19 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" - return f"{self.post.shortlink}/{self.id}#context" + return f"/@{self.wall_user.username}/wall/comment/{self.id}" + return f"{self.post.shortlink}/{self.id}" @property @lazy @@ -176,7 +176,7 @@ class Comment(Base): @property @lazy def morecomments(self): - return f"{self.post.permalink}/{self.id}?context=0#context" + return f"{self.post.permalink}/{self.id}?context=0" @property @lazy diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 8419a5528b..450ea6e948 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 ef6840aeeb..4861178e75 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 d63413d800..5ab1e4ce87 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -218,7 +218,7 @@ def award_thing(v, thing_type, id): link = f"/{thing_type}/{thing.id}" link2 = link if thing_type == 'comment': - link2 += '#context' + link2 += '' 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 c754e8951b..0ee050c174 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -310,9 +310,9 @@ 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}?read=true#context' + url = f'{SITE_FULL}/comment/{c.id}?read=true' if not posting_to_submission: - url = f'{SITE_FULL}/@{c.wall_user.username}/wall/comment/{c.id}?read=true#context' + url = f'{SITE_FULL}/@{c.wall_user.username}/wall/comment/{c.id}?read=true' push_notif(parent_user.id, title, notifbody, url) diff --git a/files/routes/subs.py b/files/routes/subs.py index 38f78072f6..a2031a6ab1 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)