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!")