diff --git a/src/web/active-listener.ts b/src/web/active-listener.ts index bf1ff4c6f..633d03c7d 100644 --- a/src/web/active-listener.ts +++ b/src/web/active-listener.ts @@ -3,6 +3,7 @@ import { DEFAULT_ACCOUNT_ID } from "../routing/session-key.js"; export type ActiveWebSendOptions = { gifPlayback?: boolean; + accountId?: string; }; export type ActiveWebListener = { diff --git a/src/web/inbound.ts b/src/web/inbound.ts index 589e7ddde..f4645509f 100644 --- a/src/web/inbound.ts +++ b/src/web/inbound.ts @@ -587,7 +587,7 @@ export async function monitorWebInbox(options: { const result = await sock.sendMessage(jid, payload); recordProviderActivity({ provider: "whatsapp", - accountId: options.accountId, + accountId: options?.accountId, direction: "outbound", }); return { messageId: result?.key?.id ?? "unknown" }; @@ -610,7 +610,7 @@ export async function monitorWebInbox(options: { }); recordProviderActivity({ provider: "whatsapp", - accountId: options.accountId, + accountId: options?.accountId, direction: "outbound", }); return { messageId: result?.key?.id ?? "unknown" };