dont shadowban alrdy shadowbanned nibbas

pull/83/head
Aevann 2022-12-24 20:59:47 +02:00
parent 568e2ddbe8
commit 490aeddb02
1 changed files with 2 additions and 2 deletions

View File

@ -92,11 +92,11 @@ def check_for_alts(current:User, include_current_session=True):
session["history"] = list(past_accs)
g.db.flush()
for u in get_alt_graph(current.id):
if u.shadowbanned and current.id not in DONT_SHADOWBAN:
if u.shadowbanned and not current.shadowbanned and current.id not in DONT_SHADOWBAN:
current.shadowbanned = u.shadowbanned
current.ban_reason = u.ban_reason
g.db.add(current)
elif current.shadowbanned and u.id not in DONT_SHADOWBAN:
elif current.shadowbanned and not u.shadowbanned and u.id not in DONT_SHADOWBAN:
u.shadowbanned = current.shadowbanned
u.ban_reason = current.ban_reason
g.db.add(u)