fix revert_actions

master
Aevann1 2022-08-13 00:55:44 +02:00
parent 33018c164b
commit 539188ed85
1 changed files with 4 additions and 3 deletions

View File

@ -263,20 +263,21 @@ def revert_actions(v, username):
for user in users:
user.shadowbanned = None
user.is_banned = 0
user.unban_utc = 0
user.ban_evade = 0
user.ban_reason = None
if user.is_banned:
user.is_banned = 0
send_repeatable_notification(user.id, f"@{v.username} has unbanned you!")
g.db.add(user)
for u in user.alts:
u.shadowbanned = None
u.is_banned = 0
u.unban_utc = 0
u.ban_evade = 0
u.ban_reason = None
if u.is_banned:
u.is_banned = 0
send_repeatable_notification(u.id, f"@{v.username} has unbanned you!")
g.db.add(u)