Fix forwarded image payload parsing for agent channels

This commit is contained in:
jxxghp
2026-04-11 20:55:14 +08:00
parent 6c5fae56d9
commit edf3946558
4 changed files with 87 additions and 3 deletions
+6 -1
View File
@@ -193,10 +193,15 @@ class SlackModule(_ModuleBase, _MessageBase[Slack]):
if not client_config:
return None
try:
msg_json: dict = json.loads(body)
msg_json = json.loads(body)
while isinstance(msg_json, str):
msg_json = json.loads(msg_json)
except Exception as err:
logger.debug(f"解析Slack消息失败:{str(err)}")
return None
if not isinstance(msg_json, dict):
logger.debug(f"Slack消息格式无效:{type(msg_json)}")
return None
if msg_json:
images = None
if msg_json.get("type") == "message":