fix 500 error

pull/216/head
Aevann 2023-10-29 18:53:05 +03:00
parent 68a8acded6
commit f65079f450
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, obj=None, followers_ping=Tr
if len(notify_users) > 400 and v.admin_level < PERMS['POST_COMMENT_INFINITE_PINGS']:
abort(403, "You can only notify a maximum of 400 users.")
if v.shadowbanned or obj.is_banned:
if v.shadowbanned or (obj and obj.is_banned):
notify_users = set(x[0] for x in g.db.query(User.id).filter(User.id.in_(notify_users), User.admin_level >= PERMS['USER_SHADOWBAN']).all())
return notify_users - BOT_IDs - {v.id, 0} - v.all_twoway_blocks - v.muters