fix last commit
parent
97507f37d3
commit
05088ab0bc
|
@ -45,7 +45,7 @@ def send_repeatable_notification(uid, text):
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
push_notif({uid}, 'New notification', text, f'{SITE_FULL}/notification/{c.id}')
|
push_notif({uid}, 'New notification', text, f'{SITE_FULL}/notification/{c.id}')
|
||||||
return
|
return notif
|
||||||
|
|
||||||
cid = create_comment(text_html)
|
cid = create_comment(text_html)
|
||||||
notif = Notification(comment_id=cid, user_id=uid)
|
notif = Notification(comment_id=cid, user_id=uid)
|
||||||
|
|
|
@ -25,6 +25,8 @@ def badge_grant(user, badge_id, description=None, url=None, notify=True):
|
||||||
g.db.flush()
|
g.db.flush()
|
||||||
|
|
||||||
if notify:
|
if notify:
|
||||||
send_repeatable_notification(user.id,
|
notif = send_repeatable_notification(user.id,
|
||||||
"@AutoJanny has given you the following profile badge:\n\n" +
|
"@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
|
||||||
|
|
Loading…
Reference in New Issue