diff --git a/src/gateway/protocol/index.ts b/src/gateway/protocol/index.ts index edd0d4590..6dad0d7e3 100644 --- a/src/gateway/protocol/index.ts +++ b/src/gateway/protocol/index.ts @@ -81,8 +81,6 @@ import { type ResponseFrame, ResponseFrameSchema, SendParamsSchema, - type PollParams, - PollParamsSchema, type SessionsCompactParams, SessionsCompactParamsSchema, type SessionsDeleteParams, diff --git a/src/telegram/bot.ts b/src/telegram/bot.ts index aaf179d42..cf0ca2c79 100644 --- a/src/telegram/bot.ts +++ b/src/telegram/bot.ts @@ -159,7 +159,8 @@ export function createTelegramBot(opts: TelegramBotOptions) { (senderUsername && normalizedAllowFromLower.some( (entry) => - entry === senderUsernameLower || entry === `@${senderUsernameLower}`, + entry === senderUsernameLower || + entry === `@${senderUsernameLower}`, )); const wasMentioned = (Boolean(botUsername) && hasBotMention(msg, botUsername)) || diff --git a/src/web/inbound.ts b/src/web/inbound.ts index 973a0c4b4..545ad8d63 100644 --- a/src/web/inbound.ts +++ b/src/web/inbound.ts @@ -456,6 +456,10 @@ export async function monitorWebInbox(options: { const result = await sock.sendMessage(jid, payload); return { messageId: result?.key?.id ?? "unknown" }; }, + /** + * Send a poll message through this connection's socket. + * Used by IPC to create WhatsApp polls in groups or chats. + */ sendPoll: async ( to: string, poll: { question: string; options: string[]; maxSelections?: number }, @@ -478,24 +482,6 @@ export async function monitorWebInbox(options: { const jid = toWhatsappJid(to); await sock.sendPresenceUpdate("composing", jid); }, - /** - * Send a poll message through this connection's socket. - * Used by IPC to create WhatsApp polls in groups or chats. - */ - sendPoll: async ( - to: string, - poll: { question: string; options: string[]; selectableCount?: number }, - ): Promise<{ messageId: string }> => { - const jid = toWhatsappJid(to); - const result = await sock.sendMessage(jid, { - poll: { - name: poll.question, - values: poll.options, - selectableCount: poll.selectableCount ?? 1, - }, - }); - return { messageId: result?.key?.id ?? "unknown" }; - }, } as const; }