|
|
|
@ -90,7 +90,10 @@ class WebSocketAdapter: |
|
|
|
if msg: |
|
|
|
# 将消息数据序列化为JSON字符串 |
|
|
|
import json |
|
|
|
if isinstance(msg.data, dict): |
|
|
|
if msg.data is None: |
|
|
|
# 如果data为None,跳过发送 |
|
|
|
logger.debug(f"适配器跳过空数据消息: {self.outbound_channel.name} -> {msg.type}") |
|
|
|
elif isinstance(msg.data, dict): |
|
|
|
# 在发送时添加type字段 |
|
|
|
send_data = { |
|
|
|
"Type": msg.type, |
|
|
|
|