2
0

🐛 (whatsapp) Fix preview_url parsing

This commit is contained in:
Baptiste Arnaud
2024-05-23 16:36:10 +02:00
parent c53ce349af
commit 88d98f05a0
2 changed files with 3 additions and 4 deletions

View File

@ -71,8 +71,8 @@ export const convertMessageToWhatsAppMessage = (
message.content.type as EmbeddableVideoBubbleContentType
]
}/${message.content.id}`,
preview_url: true,
},
preview_url: true,
}
return null
}
@ -82,8 +82,8 @@ export const convertMessageToWhatsAppMessage = (
type: 'text',
text: {
body: message.content.url,
preview_url: true,
},
preview_url: true,
}
}
case 'custom-embed': {
@ -92,8 +92,8 @@ export const convertMessageToWhatsAppMessage = (
type: 'text',
text: {
body: message.content.url,
preview_url: true,
},
preview_url: true,
}
}
}

View File

@ -60,7 +60,6 @@ const sendingMessageSchema = z.discriminatedUnion('type', [
body: z.string(),
preview_url: z.boolean().optional(),
}),
preview_url: z.boolean().optional(),
}),
z.object({
type: z.literal('image'),