forked from rDrama/rDrama
1
0
Fork 0

fix last commit

master
Aevann 2023-11-16 00:23:31 +02:00
parent 97507f37d3
commit 05088ab0bc
2 changed files with 5 additions and 3 deletions

View File

@ -45,7 +45,7 @@ def send_repeatable_notification(uid, text):
g.db.add(notif)
push_notif({uid}, 'New notification', text, f'{SITE_FULL}/notification/{c.id}')
return
return notif
cid = create_comment(text_html)
notif = Notification(comment_id=cid, user_id=uid)

View File

@ -25,6 +25,8 @@ def badge_grant(user, badge_id, description=None, url=None, notify=True):
g.db.flush()
if notify:
send_repeatable_notification(user.id,
notif = send_repeatable_notification(user.id,
"@AutoJanny has given you the following profile badge:\n\n" +
f"{badge.path}\n\n**{badge.name}**\n\n{badge.badge.description}").created_utc -= 1
f"{badge.path}\n\n**{badge.name}**\n\n{badge.badge.description}")
if notif:
notif.created_utc -= 1