notify of flairs

master
Aevann1 2022-11-11 19:04:31 +02:00
parent ecf68caf20
commit e28d26db2d
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,7 @@ def flag_post(pid, v):
_note=f'"{post.flair}"'
)
g.db.add(ma)
position = 'Admin'
else:
ma = SubAction(
sub=post.sub,
@ -40,6 +41,12 @@ def flag_post(pid, v):
_note=f'"{post.flair}"'
)
g.db.add(ma)
position = f'/h/{post.sub} Mod'
if v.id != post.author_id:
message = f'@{v.username} ({position}) has flaired [{post.title}]({post.shortlink}) with the flair: `"{post.flair}"`'
send_repeatable_notification(post.author_id, message)
return {"message": "Post flaired successfully!"}
moved = move_post(post, v, reason)