Skip to content

Commit

Permalink
truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Dec 8, 2024
1 parent 52088c4 commit 6a8323c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/whatsapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ const textParams = (type: ParamType) =>
map(pipe(replace(/\n|\t|(\s\s\s\s)/g, " | "), convertToWhatsAppFormat)),
(texts: string[]) => ({
type,
parameters: texts.map((text) => ({ type: "text", text })),
parameters: texts.map((text) => ({
type: "text",
text: truncate(60)(text),
})),
}),
);

Expand Down

0 comments on commit 6a8323c

Please sign in to comment.