forked from rDrama/rDrama
fix order of notifications
parent
9678f65c12
commit
e28049ea65
|
@ -53,6 +53,8 @@ def send_repeatable_notification(uid, text):
|
||||||
|
|
||||||
push_notif({uid}, 'New notification', text, f'{SITE_FULL}/notification/{cid}')
|
push_notif({uid}, 'New notification', text, f'{SITE_FULL}/notification/{cid}')
|
||||||
|
|
||||||
|
return notif
|
||||||
|
|
||||||
|
|
||||||
def send_notification(uid, text):
|
def send_notification(uid, text):
|
||||||
if uid in BOT_IDs: return
|
if uid in BOT_IDs: return
|
||||||
|
|
|
@ -601,9 +601,9 @@ def award_thing(v, thing_type, id):
|
||||||
if v.id != author.id:
|
if v.id != author.id:
|
||||||
if author.deflector and AWARDS[kind]['deflectable']:
|
if author.deflector and AWARDS[kind]['deflectable']:
|
||||||
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {award_title} Award but it was deflected and applied to them :marseytroll:"
|
msg = f"@{v.username} has tried to give your [{thing_type}]({thing.shortlink}) the {award_title} Award but it was deflected and applied to them :marseytroll:"
|
||||||
send_repeatable_notification(author.id, msg)
|
send_repeatable_notification(author.id, msg).created_utc -= 1
|
||||||
msg = f"{safe_username} under the effect of a deflector award; your {award_title} Award has been deflected back to you :marseytroll:"
|
msg = f"{safe_username} under the effect of a deflector award; your {award_title} Award has been deflected back to you :marseytroll:"
|
||||||
send_repeatable_notification(v.id, msg)
|
send_repeatable_notification(v.id, msg).created_utc -= 1
|
||||||
elif kind not in {'spider', 'jumpscare'}:
|
elif kind not in {'spider', 'jumpscare'}:
|
||||||
msg = f"@{v.username} has given [{link_text_in_notif}]({thing.shortlink}) the {award_title} Award"
|
msg = f"@{v.username} has given [{link_text_in_notif}]({thing.shortlink}) the {award_title} Award"
|
||||||
|
|
||||||
|
@ -620,7 +620,7 @@ def award_thing(v, thing_type, id):
|
||||||
if kind == "chud":
|
if kind == "chud":
|
||||||
msg += f"\n\n**You now have to say this phrase in all posts and comments you make for 24 hours:**"
|
msg += f"\n\n**You now have to say this phrase in all posts and comments you make for 24 hours:**"
|
||||||
msg += f"\n\n> {note}"
|
msg += f"\n\n> {note}"
|
||||||
send_repeatable_notification(author.id, msg)
|
send_repeatable_notification(author.id, msg).created_utc -= 1
|
||||||
|
|
||||||
|
|
||||||
if author.received_award_count: author.received_award_count += 1
|
if author.received_award_count: author.received_award_count += 1
|
||||||
|
|
Loading…
Reference in New Issue