forked from rDrama/rDrama
1
0
Fork 0

include username in push notifs

master
Aevann 2023-02-24 04:22:47 +02:00
parent 655159fbf3
commit 5a511c00a8
3 changed files with 4 additions and 4 deletions

View File

@ -124,4 +124,4 @@ def notify_mentions(mentions, send_to=None, mention_str='site mention'):
g.db.add(notif)
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')

View File

@ -230,13 +230,13 @@ def execute_blackjack(v, target, body, type):
g.db.add(n)
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
if extra_info:
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
def render_emoji(html, regexp, golden, marseys_used, b=False):

View File

@ -259,7 +259,7 @@ def submit_contact(v):
g.db.add(notif)
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!")