This commit is contained in:
Aevann1 2022-03-17 18:12:59 +02:00
parent ddb2256a9f
commit be2be7b743
4 changed files with 18 additions and 1 deletions

View file

@ -226,6 +226,9 @@ def award_post(pid, v):
author = post.author
if author.id == PIZZASHILL_ID:
return {"error": "Pizzashill is immune to awards."}, 403
if v.id != author.id:
msg = f"@{v.username} has given your [post]({post.shortlink}) the {AWARDS[kind]['title']} Award!"
if note: msg += f"\n\n> {note}"
@ -444,6 +447,9 @@ def award_comment(cid, v):
author = c.author
if author.id == PIZZASHILL_ID:
return {"error": "Pizzashill is immune to awards."}, 403
if v.id != author.id:
msg = f"@{v.username} has given your [comment]({c.shortlink}) the {AWARDS[kind]['title']} Award!"
if note: msg += f"\n\n> {note}"