forked from rDrama/rDrama
include username in push notifs
parent
655159fbf3
commit
5a511c00a8
|
@ -124,4 +124,4 @@ def notify_mentions(mentions, send_to=None, mention_str='site mention'):
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
push_notif({send_to}, f'New mention of you on reddit', new_comment.body, f'{SITE_FULL}/comment/{new_comment.id}?read=true#context')
|
push_notif({send_to}, f'New mention of you on reddit by /u/{author}', new_comment.body, f'{SITE_FULL}/comment/{new_comment.id}?read=true#context')
|
||||||
|
|
|
@ -230,13 +230,13 @@ def execute_blackjack(v, target, body, type):
|
||||||
g.db.add(n)
|
g.db.add(n)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
push_notif(notified_ids, 'Blackjack!', target.body, (target.id,bool(target.wall_user_id)))
|
push_notif(notified_ids, f'Blackjack by @{v.username}', target.body, (target.id,bool(target.wall_user_id)))
|
||||||
|
|
||||||
extra_info = None
|
extra_info = None
|
||||||
|
|
||||||
if extra_info:
|
if extra_info:
|
||||||
for id in notified_ids:
|
for id in notified_ids:
|
||||||
send_repeatable_notification_duplicated(id, f"Blackjack for @{v.username}: {extra_info}")
|
send_repeatable_notification_duplicated(id, f"Blackjack by @{v.username}: {extra_info}")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def render_emoji(html, regexp, golden, marseys_used, b=False):
|
def render_emoji(html, regexp, golden, marseys_used, b=False):
|
||||||
|
|
|
@ -259,7 +259,7 @@ def submit_contact(v):
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
push_notif(admin_ids, 'New modmail', new_comment.body, f'{SITE_FULL}/notifications/modmail')
|
push_notif(admin_ids, f'New modmail from @{v.username}', new_comment.body, f'{SITE_FULL}/notifications/modmail')
|
||||||
|
|
||||||
return redirect("/contact?msg=Your message has been sent to the admins!")
|
return redirect("/contact?msg=Your message has been sent to the admins!")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue