mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-28 21:01:28 +08:00
🐛 (whatsapp) Add contacts incoming message type
This commit is contained in:
parent
9d08b4b758
commit
1796cf5ea1
@ -187,6 +187,24 @@ export const incomingMessageSchema = z.discriminatedUnion("type", [
|
||||
mime_type: z.string(),
|
||||
}),
|
||||
}),
|
||||
sharedIncomingMessageFieldsSchema.extend({
|
||||
type: z.literal("contacts"),
|
||||
contacts: z.object({
|
||||
name: z
|
||||
.object({
|
||||
formatted_name: z.string(),
|
||||
})
|
||||
.optional(),
|
||||
phones: z
|
||||
.array(
|
||||
z.object({
|
||||
phone: z.string().optional(),
|
||||
type: z.string().optional(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
}),
|
||||
}),
|
||||
sharedIncomingMessageFieldsSchema.extend({
|
||||
type: z.literal("unsupported"),
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user