make chudding affect the comment its applied on

pull/157/head
Aevann 2023-06-23 20:47:57 +03:00
parent bb3c120e8c
commit fe5261df36
2 changed files with 6 additions and 0 deletions

View File

@ -1048,6 +1048,8 @@ def chud(id, v):
elif id.startswith('c_'):
comment_id = id.split('c_')[1]
comment = g.db.get(Comment, comment_id)
comment.chudded = True
g.db.add(comment)
user = comment.author
else:
user = get_account(id)

View File

@ -382,6 +382,10 @@ def award_thing(v, thing_type, id):
author.chud_phrase = note.lower()
badge_grant(user=author, badge_id=58)
if thing_type == 'comment':
thing.chudded = True
elif kind == "flairlock":
new_name = note[:100]
new_name = remove_cuniform(new_name)