Merge branch 'main' into dev/chat

dev/chat
Lei OT 2 years ago
commit cdb840d819

@ -37,9 +37,9 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get
let headerObj, footerObj, buttonsArr;
if (!isEmpty(template)) {
const componentsObj = groupBy(template.components, (item) => item.type);
headerObj = componentsObj.header[0];
footerObj = componentsObj.footer[0];
buttonsArr = componentsObj.buttons.reduce((r, c) => r.concat(c.buttons), []);
headerObj = componentsObj?.header?.[0];
footerObj = componentsObj?.footer?.[0];
buttonsArr = componentsObj?.buttons?.reduce((r, c) => r.concat(c.buttons), []);
}
const parts = str.split(/(https?:\/\/[^\s]+|\p{Emoji_Presentation})/gmu).filter((s) => s !== '');

Loading…
Cancel
Save