This commit is contained in:
张成
2026-03-13 16:53:26 +08:00
parent 2c021c24ef
commit 6aeee136c4
3 changed files with 51 additions and 16 deletions

View File

@@ -130,6 +130,17 @@ class ScheduleManager {
console.error('[调度管理器] 处理响应消息失败:', error);
}
});
// 订阅 Boss 聊天消息主题,将 boss-automation-nodejs 转发过来的新消息交给 mqttDispatcher 处理
this.mqttClient.subscribe("boss/message", async (topic, message) => {
try {
if (this.mqttDispatcher && typeof this.mqttDispatcher.handleBossMessage === 'function') {
await this.mqttDispatcher.handleBossMessage(message);
}
} catch (error) {
console.error('[调度管理器] 处理 Boss 消息失败:', error);
}
});
}