diff --git a/docs/automation/poll.md b/docs/automation/poll.md index 12aef2dd5..4860ae269 100644 --- a/docs/automation/poll.md +++ b/docs/automation/poll.md @@ -33,7 +33,7 @@ clawdbot message poll --provider msteams --to conversation:19:abc@thread.tacv2 \ ``` Options: -- `--provider`: `whatsapp` (default) or `discord` +- `--provider`: `whatsapp` (default), `discord`, or `msteams` - `--poll-multi`: allow selecting multiple options - `--poll-duration-hours`: Discord-only (defaults to 24 when omitted) diff --git a/src/commands/message.ts b/src/commands/message.ts index 731d452a3..1efadec31 100644 --- a/src/commands/message.ts +++ b/src/commands/message.ts @@ -283,6 +283,8 @@ export async function messageCommand( sendSlack: deps.sendMessageSlack, sendSignal: deps.sendMessageSignal, sendIMessage: deps.sendMessageIMessage, + sendMSTeams: (to, text, opts) => + deps.sendMessageMSTeams({ cfg, to, text, mediaUrl: opts?.mediaUrl }), }; if (opts.dryRun && action !== "send" && action !== "poll") { diff --git a/src/infra/outbound/message.ts b/src/infra/outbound/message.ts index 17880720a..e3090ec6d 100644 --- a/src/infra/outbound/message.ts +++ b/src/infra/outbound/message.ts @@ -169,7 +169,7 @@ export async function sendMessage( export async function sendPoll( params: MessagePollParams, ): Promise { - const provider = (params.provider ?? "whatsapp").toLowerCase(); + const provider = normalizeMessageProvider(params.provider) ?? "whatsapp"; if ( provider !== "whatsapp" && provider !== "discord" && @@ -205,6 +205,8 @@ export async function sendPoll( messageId: string; toJid?: string; channelId?: string; + conversationId?: string; + pollId?: string; }>({ url: gateway.url, token: gateway.token,