put check_for_alts in under_siege flow

pull/173/head
Aevann 2023-07-25 19:42:16 +03:00
parent c6e9f7b216
commit 3e6e1fdcc8
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,8 @@ from files.helpers.sanitize import *
from files.helpers.settings import get_setting
from files.helpers.slots import check_slots_command
from files.routes.routehelpers import check_for_alts
post_target_type = Union[Post, User]
def _archiveorg(url):
@ -513,6 +515,9 @@ def execute_under_siege(v:User, target:Optional[Union[Post, Comment]], body, kin
unshadowbannedcels = [x[0] for x in g.db.query(ModAction.target_user_id).filter_by(kind='unshadowban').all()]
if v.id in unshadowbannedcels: return
check_for_alts(v)
if v.shadowbanned: return
v.shadowbanned = AUTOJANNY_ID
v.ban_reason = "Under Siege"
g.db.add(v)