awards: don't allow users to award messages

remotes/1693176582716663532/tmp_refs/heads/watchparty
justcool393 2022-11-12 04:28:56 -06:00
parent 3f17624de6
commit 1608b3168a
1 changed files with 5 additions and 2 deletions

View File

@ -125,8 +125,11 @@ def buy(v, award):
@is_not_permabanned
@feature_required('AWARDS')
def award_thing(v, thing_type, id):
if thing_type == 'post': thing = get_post(id)
else: thing = get_comment(id)
if thing_type == 'post':
thing = get_post(id)
else:
thing = get_comment(id)
if not thing.parent_submission: abort(404) # don't let users award messages
if v.shadowbanned: abort(500)