(Mod) -> (/h/sub Mod)

master
Aevann1 2022-11-11 19:01:40 +02:00
parent dbd5c133bf
commit ecf68caf20
2 changed files with 6 additions and 6 deletions

View File

@ -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}"

View File

@ -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!"}