chore: fix type regressions and helpers

This commit is contained in:
Peter Steinberger
2025-11-25 04:40:57 +01:00
parent 13be898c07
commit 2aac606979
8 changed files with 32 additions and 14 deletions

View File

@@ -114,7 +114,7 @@ async function handleMessages(
if (!m.from || !m.to) continue;
try {
await deps.autoReplyIfConfigured(
client as unknown as {
client as unknown as import("./types.js").TwilioRequester & {
messages: { create: (opts: unknown) => Promise<unknown> };
},
m as unknown as MessageInstance,

View File

@@ -16,8 +16,8 @@ type TwilioRequester = {
export async function sendTypingIndicator(
client: TwilioRequester,
messageSid?: string,
runtime: RuntimeEnv,
messageSid?: string,
) {
// Best-effort WhatsApp typing indicator (public beta as of Nov 2025).
if (!messageSid) {

View File

@@ -43,7 +43,7 @@ export async function startWebhook(
replyText = await getReplyFromConfig(
{ Body, From, To, MessageSid },
{
onReplyStart: () => sendTypingIndicator(client, MessageSid, runtime),
onReplyStart: () => sendTypingIndicator(client, runtime, MessageSid),
},
);
}