From 0302270e1680bd34b4ea541ae3182a97fefb856e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 13 Sep 2022 11:01:30 +0200 Subject: [PATCH] more detailed pin/unpin messages --- files/routes/admin.py | 4 ++-- files/routes/subs.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 8f409fb17..501ed6524 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1239,7 +1239,7 @@ def sticky_post(post_id, v): g.db.add(ma) if v.id != post.author_id: - send_repeatable_notification(post.author_id, f"@{v.username} has pinned your [post](/post/{post_id})!") + send_repeatable_notification(post.author_id, f"@{v.username} has pinned [{post.title}](/post/{post_id})!") cache.delete_memoized(frontlist) return {"message": "Post pinned!"} @@ -1264,7 +1264,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} has unpinned your [post](/post/{post_id})!") + send_repeatable_notification(post.author_id, f"@{v.username} has unpinned [{post.title}](/post/{post_id})!") cache.delete_memoized(frontlist) return {"message": "Post unpinned!"} diff --git a/files/routes/subs.py b/files/routes/subs.py index 7abd82055..1d906ab9e 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -519,7 +519,7 @@ def hole_pin(v, pid): g.db.add(p) if v.id != p.author_id: - message = f"@{v.username} (Mod) has pinned your [post]({p.shortlink}) in /h/{p.sub}" + message = f"@{v.username} (Mod) has pinned [{p.title}]({p.shortlink}) in /h/{p.sub}" send_repeatable_notification(p.author_id, message) return {"message": f"Post pinned to /h/{p.sub} successfully!"} @@ -537,7 +537,7 @@ def hole_unpin(v, pid): g.db.add(p) if v.id != p.author_id: - message = f"@{v.username} (Mod) has unpinned your [post]({p.shortlink}) in /h/{p.sub}" + message = f"@{v.username} (Mod) has unpinned [{p.title}]({p.shortlink}) in /h/{p.sub}" send_repeatable_notification(p.author_id, message) return {"message": f"Post unpinned from /h/{p.sub} successfully!"}