add a link to the post/comment in the grass ban reason

pull/127/head
Aevann 2023-02-19 00:44:16 +02:00
parent 5d0c3742b0
commit 1754eeffe2
1 changed files with 3 additions and 1 deletions

View File

@ -245,7 +245,9 @@ def award_thing(v, thing_type, id):
elif kind == "grass":
link3 = f"/{thing_type}/{thing.id}"
if thing_type == 'comment':
link3 += '#context'
link3 = f'<a href="{link3}#context">{link3}</a>'
else:
link3 = f'<a href="{link3}">{link3}</a>'
author.is_banned = AUTOJANNY_ID
author.ban_reason = f"grass award used by @{v.username} on {link3}"