mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 03:27:31 +08:00
fix 消息交互
This commit is contained in:
@@ -77,7 +77,13 @@ class VoceChatModule(_ModuleBase, _MessageBase[VoceChat]):
|
||||
}
|
||||
"""
|
||||
# 获取渠道
|
||||
client_config = self.get_config(source)
|
||||
client_config = None
|
||||
if source:
|
||||
client_config = self.get_config(source)
|
||||
else:
|
||||
client_configs = self.get_configs()
|
||||
if client_configs:
|
||||
client_config = list(client_configs.values())[0]
|
||||
if not client_config:
|
||||
return None
|
||||
# 报文体
|
||||
@@ -102,8 +108,8 @@ class VoceChatModule(_ModuleBase, _MessageBase[VoceChat]):
|
||||
|
||||
# 处理消息内容
|
||||
if content and userid:
|
||||
logger.info(f"收到VoceChat消息:userid={userid}, text={content}")
|
||||
return CommingMessage(channel=MessageChannel.VoceChat,
|
||||
logger.info(f"收到来自 {client_config.name} 的VoceChat消息:userid={userid}, text={content}")
|
||||
return CommingMessage(channel=MessageChannel.VoceChat, source=client_config.name,
|
||||
userid=userid, username=userid, text=content)
|
||||
except Exception as err:
|
||||
logger.error(f"VoceChat消息处理发生错误:{str(err)}")
|
||||
|
||||
Reference in New Issue
Block a user