⚡ (whatsapp) Improve / fix markdown serializer
Forked remark-slate code to create Typebot's own serializer Closes #1056
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { ContinueChatResponse } from '@typebot.io/schemas'
|
||||
import { WhatsAppSendingMessage } from '@typebot.io/schemas/features/whatsapp'
|
||||
import { convertRichTextToWhatsAppText } from './convertRichTextToWhatsAppText'
|
||||
import { isSvgSrc } from '@typebot.io/lib/utils'
|
||||
import { BubbleBlockType } from '@typebot.io/schemas/features/blocks/bubbles/constants'
|
||||
import { VideoBubbleContentType } from '@typebot.io/schemas/features/blocks/bubbles/video/constants'
|
||||
import { convertRichTextToMarkdown } from '@typebot.io/lib/serializer/convertRichTextToMarkdown'
|
||||
|
||||
const mp4HttpsUrlRegex = /^https:\/\/.*\.mp4$/
|
||||
|
||||
@ -17,7 +17,9 @@ export const convertMessageToWhatsAppMessage = (
|
||||
return {
|
||||
type: 'text',
|
||||
text: {
|
||||
body: convertRichTextToWhatsAppText(message.content.richText),
|
||||
body: convertRichTextToMarkdown(message.content.richText, {
|
||||
flavour: 'whatsapp',
|
||||
}),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user