diff --git a/skills/vocechat/SKILL.md b/skills/vocechat/SKILL.md index 675a798..91fe0bf 100644 --- a/skills/vocechat/SKILL.md +++ b/skills/vocechat/SKILL.md @@ -25,12 +25,11 @@ Configure in `~/.openclaw/openclaw.json`: channels: { vocechat: { enabled: true, - dmPolicy: "pairing", accounts: { default: { serverUrl: "https://your-vocechat-server.com", - apiKey: "your-api-key", - botName: "OpenClaw Bot", + botApiKey: "your-api-key", + wsServerUrl: "wss://your-vocechat-server.com/ws", }, }, }, diff --git a/src/outbound.ts b/src/outbound.ts index 66fbe77..4ffd1ae 100644 --- a/src/outbound.ts +++ b/src/outbound.ts @@ -13,7 +13,7 @@ export async function sendTextToVoceChat( to?: string | null, text?: string, ) { - const { serverUrl, apiKey } = cfg.channels?.vocechat|| {}; + const { serverUrl, apiKey } = cfg.channels?.vocechat.default || {}; try { // 根据聊天类型选择 API 端点 @@ -46,7 +46,8 @@ export async function sendMarkdown( accountId?: string | null, text?: string, ) { - const { serverUrl, apiKey } = cfg.channels?.vocechat || {}; + const { serverUrl, apiKey } = + cfg.channels?.vocechat?.[accountId || "default"] || {}; try { const endpoint = `${serverUrl}/api/bot/send_to_user/${accountId}`; @@ -79,7 +80,7 @@ export async function replyToMessage( text?: string, mid?: string | number, ) { - const { serverUrl, apiKey } = cfg.channels?.vocechat || {}; + const { serverUrl, apiKey } = cfg.channels?.vocechat?.[accountId || 'default'] || {}; try { const endpoint = `${serverUrl}/api/bot/reply/${mid}`;