forked from rDrama/rDrama
fds
parent
dd589569a4
commit
1eda3802a9
|
@ -211,9 +211,10 @@ def award_post(pid, v):
|
||||||
post_award.submission_id = post.id
|
post_award.submission_id = post.id
|
||||||
g.db.add(post_award)
|
g.db.add(post_award)
|
||||||
|
|
||||||
|
note = request.values.get("note", "").strip()
|
||||||
|
|
||||||
if v.id != post.author.id:
|
if v.id != post.author.id:
|
||||||
msg = f"@{v.username} has given your [post]({post.permalink}) the {AWARDS[kind]['title']} Award!"
|
msg = f"@{v.username} has given your [post]({post.permalink}) the {AWARDS[kind]['title']} Award!"
|
||||||
note = request.values.get("note", "").strip()
|
|
||||||
if note: msg += f"\n\n> {note}"
|
if note: msg += f"\n\n> {note}"
|
||||||
send_repeatable_notification(post.author.id, msg)
|
send_repeatable_notification(post.author.id, msg)
|
||||||
|
|
||||||
|
@ -394,9 +395,10 @@ def award_comment(cid, v):
|
||||||
comment_award.comment_id = c.id
|
comment_award.comment_id = c.id
|
||||||
g.db.add(comment_award)
|
g.db.add(comment_award)
|
||||||
|
|
||||||
|
note = request.values.get("note", "").strip()
|
||||||
|
|
||||||
if v.id != c.author.id:
|
if v.id != c.author.id:
|
||||||
msg = f"@{v.username} has given your [comment]({c.permalink}) the {AWARDS[kind]['title']} Award!"
|
msg = f"@{v.username} has given your [comment]({c.permalink}) the {AWARDS[kind]['title']} Award!"
|
||||||
note = request.values.get("note", "").strip()
|
|
||||||
if note: msg += f"\n\n> {note}"
|
if note: msg += f"\n\n> {note}"
|
||||||
send_repeatable_notification(c.author.id, msg)
|
send_repeatable_notification(c.author.id, msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue