From 4b256b649be08c014c60534f13007a4ea03f936c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 21 Nov 2021 14:32:49 +0200 Subject: [PATCH] sdfsdf --- files/classes/comment.py | 2 +- files/classes/submission.py | 2 +- files/routes/awards.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index a960598b6..aa393ed64 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -209,7 +209,7 @@ class Comment(Base): @property @lazy def shortlink(self): - return f"http://{site}/comment/{self.id}#context" + return f"/comment/{self.id}#context" @property @lazy diff --git a/files/classes/submission.py b/files/classes/submission.py index 5ed84e8f5..1dacf44bb 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -179,7 +179,7 @@ class Submission(Base): @property @lazy def shortlink(self): - return f"http://{site}/post/{self.id}" + return f"/post/{self.id}" @property @lazy diff --git a/files/routes/awards.py b/files/routes/awards.py index f4284cd39..86c5ab638 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -541,7 +541,7 @@ def award_post(pid, v): elif kind == "pizzashill": if author.longpost: author.longpost += 86400 else: author.longpost = time.time() + 86400 - send_notification(IDIO_ID, f"@{v.username} used {kind} award on {post.shortlink}") + send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{post.shortlink}") elif kind == "eye": author.eye = True send_notification(CARP_ID, f"@{v.username} used {kind} award!") @@ -675,7 +675,7 @@ def award_comment(cid, v): elif kind == "pizzashill": if author.longpost: author.longpost += 86400 else: author.longpost = time.time() + 86400 - send_notification(IDIO_ID, f"@{v.username} used {kind} award on {c.shortlink}") + send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{c.shortlink}") elif kind == "eye": author.eye = True send_notification(CARP_ID, f"@{v.username} used {kind} award!")