🐛 (whatsapp) Add contacts incoming message type

This commit is contained in:
Baptiste Arnaud 2025-04-01 10:07:07 +02:00
parent 9d08b4b758
commit 1796cf5ea1
No known key found for this signature in database

View File

@ -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"),
}),