newtw
This commit is contained in:
@@ -26,7 +26,8 @@ class QianniuAdapter(BaseAdapter):
|
||||
with open(config_path, "r", encoding="utf-8") as f:
|
||||
cfg = json.load(f)
|
||||
return cfg.get(acc_id, self._default_group_id)
|
||||
except Exception: pass
|
||||
except Exception as e:
|
||||
logger.warning(f"[QianniuAdapter] 读取转接分组配置失败: {e}")
|
||||
return self._default_group_id
|
||||
|
||||
async def translate_inbound(self, raw: dict) -> Tuple[StandardMessage, str]:
|
||||
@@ -81,6 +82,9 @@ class QianniuAdapter(BaseAdapter):
|
||||
content = res.reply_content
|
||||
|
||||
try:
|
||||
logger.info(
|
||||
f"[REPLY->CUSTOMER] user={user_id} acc={acc_id} type={res.msg_type}\n{content}"
|
||||
)
|
||||
await self.ws_client.send(customer_id=user_id, acc_id=acc_id, acc_type=acc_type, content=content, msg_type=res.msg_type)
|
||||
except Exception as e:
|
||||
logger.error(f"[QianniuAdapter] 发送失败: {e}")
|
||||
|
||||
Reference in New Issue
Block a user