🐛 (whatsapp) Fix preview_url parsing
This commit is contained in:
@ -71,8 +71,8 @@ export const convertMessageToWhatsAppMessage = (
|
|||||||
message.content.type as EmbeddableVideoBubbleContentType
|
message.content.type as EmbeddableVideoBubbleContentType
|
||||||
]
|
]
|
||||||
}/${message.content.id}`,
|
}/${message.content.id}`,
|
||||||
|
preview_url: true,
|
||||||
},
|
},
|
||||||
preview_url: true,
|
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@ -82,8 +82,8 @@ export const convertMessageToWhatsAppMessage = (
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
text: {
|
text: {
|
||||||
body: message.content.url,
|
body: message.content.url,
|
||||||
|
preview_url: true,
|
||||||
},
|
},
|
||||||
preview_url: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 'custom-embed': {
|
case 'custom-embed': {
|
||||||
@ -92,8 +92,8 @@ export const convertMessageToWhatsAppMessage = (
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
text: {
|
text: {
|
||||||
body: message.content.url,
|
body: message.content.url,
|
||||||
|
preview_url: true,
|
||||||
},
|
},
|
||||||
preview_url: true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,6 @@ const sendingMessageSchema = z.discriminatedUnion('type', [
|
|||||||
body: z.string(),
|
body: z.string(),
|
||||||
preview_url: z.boolean().optional(),
|
preview_url: z.boolean().optional(),
|
||||||
}),
|
}),
|
||||||
preview_url: z.boolean().optional(),
|
|
||||||
}),
|
}),
|
||||||
z.object({
|
z.object({
|
||||||
type: z.literal('image'),
|
type: z.literal('image'),
|
||||||
|
Reference in New Issue
Block a user