From ecf68caf20a6f2c59b96fe9faf0a45fa18408f6d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 11 Nov 2022 19:01:40 +0200 Subject: [PATCH] (Mod) -> (/h/sub Mod) --- files/routes/reporting.py | 2 +- files/routes/subs.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 0164ed4c1..e335d706a 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -170,7 +170,7 @@ def move_post(post:Submission, v:User, reason:str) -> Union[bool, str]: g.db.add(ma) if v.admin_level >= PERMS['POST_COMMENT_MODERATION']: position = 'Admin' - else: position = 'Mod' + else: position = f'/h/{sub_from} Mod' message = f"@{v.username} ({position}) has moved [{post.title}]({post.shortlink}) to /h/{post.sub}" send_repeatable_notification(post.author_id, message) return f"Post moved to /h/{post.sub}" diff --git a/files/routes/subs.py b/files/routes/subs.py index 0d449d799..862e0f240 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -368,7 +368,7 @@ def kick(v, pid): g.db.add(ma) if v.id != post.author_id: - message = f"@{v.username} (Mod) has moved [{post.title}]({post.shortlink}) from /h/{old} to the main feed!" + message = f"@{v.username} (/h/{post.sub} Mod) has moved [{post.title}]({post.shortlink}) from /h/{old} to the main feed!" send_repeatable_notification(post.author_id, message) g.db.add(post) @@ -569,7 +569,7 @@ def hole_pin(v, pid): g.db.add(p) if v.id != p.author_id: - message = f"@{v.username} (Mod) has pinned [{p.title}]({p.shortlink}) in /h/{p.sub}" + message = f"@{v.username} (/h/{p.sub} Mod) has pinned [{p.title}]({p.shortlink}) in /h/{p.sub}" send_repeatable_notification(p.author_id, message) ma = SubAction( @@ -595,7 +595,7 @@ def hole_unpin(v, pid): g.db.add(p) if v.id != p.author_id: - message = f"@{v.username} (Mod) has unpinned [{p.title}]({p.shortlink}) in /h/{p.sub}" + message = f"@{v.username} (/h/{p.sub} Mod) has unpinned [{p.title}]({p.shortlink}) in /h/{p.sub}" send_repeatable_notification(p.author_id, message) ma = SubAction( @@ -662,7 +662,7 @@ def mod_pin(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (Mod) has pinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (/h/{comment.post.sub} Mod) has pinned your [comment]({comment.shortlink})!" send_repeatable_notification(comment.author_id, message) return {"message": "Comment pinned!"} @@ -688,7 +688,7 @@ def mod_unpin(cid, v): g.db.add(ma) if v.id != comment.author_id: - message = f"@{v.username} (Mod) has unpinned your [comment]({comment.shortlink})!" + message = f"@{v.username} (/h/{comment.post.sub} Mod) has unpinned your [comment]({comment.shortlink})!" send_repeatable_notification(comment.author_id, message) return {"message": "Comment unpinned!"}