From 981d921e4e0df6fcbca5a80a2e05eeaf51175c18 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 12 Feb 2024 18:34:06 +0200 Subject: [PATCH] consistency in post linking --- files/helpers/actions.py | 2 +- files/routes/admin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index ca8040a4b..9abe7b433 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -166,7 +166,7 @@ def execute_snappy(post, v): if AWARDS["glowie"]['cosmetic']: post.author.pay_account('coins', awarded_coins) - msg = f"@Snappy has given your [post]({post.shortlink}) the {AWARDS['glowie']['title']} Award" + msg = f"@Snappy has given [{post.title}]({post.shortlink}) the {AWARDS['glowie']['title']} Award" if awarded_coins > 0: msg += f" and you have received {awarded_coins} coins as a result" msg += "!" diff --git a/files/routes/admin.py b/files/routes/admin.py index d5a279efa..51cf56da1 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1494,7 +1494,7 @@ def sticky_post(post_id, v): pin_time = 'for 1 hour' code = 200 if v.id != post.author_id: - send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has pinned [{post.title}](/post/{post_id})") + send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has pinned [{post.title}]({post.shortlink})") else: if pins >= PIN_LIMIT + 1: abort(403, f"Can't exceed {PIN_LIMIT} pinned posts limit!") @@ -1543,7 +1543,7 @@ def unsticky_post(post_id, v): g.db.add(ma) if v.id != post.author_id: - send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has unpinned [{post.title}](/post/{post_id})") + send_repeatable_notification(post.author_id, f"@{v.username} (a site admin) has unpinned [{post.title}]({post.shortlink})") cache.delete_memoized(frontlist) return {"message": "Post unpinned!"}