Fix sendToChannel to use explicit OpenClaw SDK function mapping
Replace dynamic function name construction with CHANNEL_SEND_MAP that matches the actual PluginRuntime.channel structure. Fixes WhatsApp (sendMessageWhatsApp) and iMessage (sendMessageIMessage) casing, and adds WhatsApp's required verbose option. Also adds null guard on SSE observation payload before type casting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -943,7 +943,7 @@ describe("SSE stream integration", () => {
|
||||
|
||||
await new Promise((resolve) => setTimeout(resolve, 200));
|
||||
assert.equal(sentMessages.length, 0);
|
||||
assert.ok(logs.some((l) => l.includes("Unknown channel type: matrix")));
|
||||
assert.ok(logs.some((l) => l.includes("Unsupported channel type: matrix")));
|
||||
|
||||
await getService().stop({});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user