class FreshdeskSessionGuard: @staticmethod def should_respond_freshchat(status: str, account) -> tuple[bool, str]: if status == "resolved" and account.auto_skip_resolved: return False, "conversation_resolved" return True, "ok" @staticmethod def should_respond_freshdesk(ticket_status: int, account) -> tuple[bool, str]: if ticket_status in (4, 5) and account.auto_skip_resolved: return False, "ticket_resolved_or_closed" return True, "ok"