diff --git a/src/generator/renderers/content.tsx b/src/generator/renderers/content.tsx index 5d5c178..749fbc2 100644 --- a/src/generator/renderers/content.tsx +++ b/src/generator/renderers/content.tsx @@ -20,6 +20,7 @@ export enum RenderType { EMBED, REPLY, NORMAL, + WEBHOOK, } type RenderContentContext = RenderMessageContext & { @@ -34,7 +35,10 @@ export default async function renderContent(content: string, context: RenderCont if (context.type === RenderType.REPLY && content.length > 180) content = content.slice(0, 180) + '...'; // parse the markdown - const parsed = parse(content, context.type === RenderType.EMBED ? 'extended' : 'normal'); + const parsed = parse( + content, + context.type === RenderType.EMBED || context.type === RenderType.WEBHOOK ? 'extended' : 'normal' + ); // check if the parsed content is only emojis const isOnlyEmojis = parsed.every( diff --git a/src/generator/renderers/message.tsx b/src/generator/renderers/message.tsx index f51e1dd..69da51b 100644 --- a/src/generator/renderers/message.tsx +++ b/src/generator/renderers/message.tsx @@ -46,7 +46,11 @@ export default async function renderMessage(message: Message, context: RenderMes )} {/* message content */} - {message.content && (await renderContent(message.content, { ...context, type: RenderType.NORMAL }))} + {message.content && + (await renderContent(message.content, { + ...context, + type: message.webhookId ? RenderType.WEBHOOK : RenderType.NORMAL, + }))} {/* attachments */} {await renderAttachments(message, context)}