forked from rDrama/rDrama
improvement to note
parent
1984415e35
commit
f80d9ab1fd
|
@ -506,11 +506,17 @@ def badge_grant_post(v):
|
||||||
text = f"@{v.username} (a site admin) has given you the following profile badge:\n\n{new_badge.path}\n\n**{new_badge.name}**\n\n{new_badge.badge.description}"
|
text = f"@{v.username} (a site admin) has given you the following profile badge:\n\n{new_badge.path}\n\n**{new_badge.name}**\n\n{new_badge.badge.description}"
|
||||||
send_repeatable_notification(user.id, text)
|
send_repeatable_notification(user.id, text)
|
||||||
|
|
||||||
|
note = new_badge.name
|
||||||
|
if new_badge.url:
|
||||||
|
note += f' - {new_badge.url}'
|
||||||
|
if new_badge.description:
|
||||||
|
note += f' - {new_badge.description}'
|
||||||
|
|
||||||
ma = ModAction(
|
ma = ModAction(
|
||||||
kind="badge_grant",
|
kind="badge_grant",
|
||||||
user_id=v.id,
|
user_id=v.id,
|
||||||
target_user_id=user.id,
|
target_user_id=user.id,
|
||||||
_note=new_badge.name
|
_note=note,
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue