ForcePilot/backend/package/yuxi/channel/extensions/freshdesk/session_guard.py
Kris 3e861d6cd1 feat(freshdesk): 新增Freshdesk/Freshchat渠道插件
实现完整的Freshdesk和Freshchat集成支持,包含会话守卫、错误定义、消息去重、配置管理、webhook处理、出站消息发送、状态监控、安全校验、配对功能和流式回复支持
2026-05-21 10:47:20 +08:00

14 lines
513 B
Python

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"