We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ "status": 500, "error": "Internal Server Error", "response": { "message": "\nInvalid S.integrationSession.update() invocation in\n/evolution/dist/main.js:161:17468\n\n 158 ));let g=\"\";d.bold&&(g+=\"*\"),d.italic&&(g+=\"_\"),d.underline&&(g+=\"~\");let h=${g}${l}${g.split("").reverse().join("")};return d.url&&(h=d.children[0]?.text?[${h}]\n 159 (${d.url}):${d.url}),h}async function u(d,l,g,h,m,f,b,S){for(let w of h){if(w.type===\"text\"){let E=\"\";for(let C of w.content.richText){for(let O of C.children)E+=b(O);E+=\n 160 }if(E=E.replace(/\\*\\*/g,\"\").replace(/__/,\"\").replace(/~~/,\"\").replace(/\\n$/,\"\"),E=E.replace(/\\n$/,\"\"),E.includes(\"[list]\")){let C={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},O=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),_=E.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),L=E.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);O&&(C.title=O[1].trim()),N&&(C.description=N[1].trim()),_&&(C.buttonText=_[1].trim()),L&&(C.footerText=L[1].trim());let q=E.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(q){let H=q.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);H&&H.forEach(V=>{let G=V.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),J=V.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),Q={title:G,rows:J?.map(Tn=>({title:Tn.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Tn.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Tn.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};C.sections.push(Q)})}await d.listMessage(C)}else if(E.includes(\"[buttons]\")){let C={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},O=E.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),N=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),_=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),L=E.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);N&&(C.title=N[1].trim()),O&&(C.thumbnailUrl=O[1].trim()),_&&(C.description=_[1].trim()),L&&(C.footer=L[1].trim());let q={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[H,V]of Object.entries(q)){let G;for(;(G=V.exec(E))!==null;){let J=G[1].trim(),Q={type:H};switch(H){case\"pix\":Q.currency=J.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.name=J.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.keyType=J.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.key=J.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.id=J.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.copyCode=J.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.phoneNumber=J.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.url=J.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(Q).length>1&&C.buttons.push(Q)}}await d.buttonMessage(C)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:E},!1);$(\"/message/sendText\")}w.type===\"image\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"image\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"video\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"video\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"audio\"&&(await d.audioWhatsapp({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,encoding:!0,audio:w.content.url},!1),$(\"/message/sendWhatsAppAudio\"));let I=a(f,w.id);I&&await new Promise(E=>setTimeout(E,I*1e3))}if(console.log(\"input\",m),m){if(m.type===\"choice input\"){let w=\"\",I=m.items;for(let E of I)w+=\u25B6\uFE0F ${E.content}\n→ 161 ;if(w=w.replace(/\\n$/,\"\"),w.includes(\"[list]\")){let E={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},C=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),O=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),N=w.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),_=w.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);C&&(E.title=C[1].trim()),O&&(E.description=O[1].trim()),N&&(E.buttonText=N[1].trim()),_&&(E.footerText=_[1].trim());let L=w.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(L){let q=L.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);q&&q.forEach(H=>{let V=H.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),G=H.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),J={title:V,rows:G?.map(Q=>({title:Q.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Q.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Q.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};E.sections.push(J)})}await d.listMessage(E)}else if(w.includes(\"[buttons]\")){let E={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},C=w.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),O=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),_=w.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);O&&(E.title=O[1].trim()),C&&(E.thumbnailUrl=C[1].trim()),N&&(E.description=N[1].trim()),_&&(E.footer=_[1].trim());let L={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[q,H]of Object.entries(L)){let V;for(;(V=H.exec(w))!==null;){let G=V[1].trim(),J={type:q};switch(q){case\"pix\":J.currency=G.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.name=G.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.keyType=G.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.key=G.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.id=G.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.copyCode=G.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.phoneNumber=G.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.url=G.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(J).length>1&&E.buttons.push(J)}}await d.buttonMessage(E)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:w},!1);$(\"/message/sendText\")}await S.integrationSession.update({\n where: {\n instanceId: \"72b92e28-1ee4-4e3d-aac5-eeb0b91486bc\",\n remoteJid: undefined,\n keyId: \"3EB0B239C45C50E580A669685B84A0A50F99D16D\"\n },\n take: undefined,\n + skip: Int\n })\n\nArgument skip` is missing." } }
S.integrationSession.update()
));let g=\"\";d.bold&&(g+=\"*\"),d.italic&&(g+=\"_\"),d.underline&&(g+=\"~\");let h=
;return d.url&&(h=d.children[0]?.text?
:
),h}async function u(d,l,g,h,m,f,b,S){for(let w of h){if(w.type===\"text\"){let E=\"\";for(let C of w.content.richText){for(let O of C.children)E+=b(O);E+=
}if(E=E.replace(/\\*\\*/g,\"\").replace(/__/,\"\").replace(/~~/,\"\").replace(/\\n$/,\"\"),E=E.replace(/\\n$/,\"\"),E.includes(\"[list]\")){let C={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},O=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),_=E.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),L=E.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);O&&(C.title=O[1].trim()),N&&(C.description=N[1].trim()),_&&(C.buttonText=_[1].trim()),L&&(C.footerText=L[1].trim());let q=E.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(q){let H=q.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);H&&H.forEach(V=>{let G=V.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),J=V.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),Q={title:G,rows:J?.map(Tn=>({title:Tn.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Tn.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Tn.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};C.sections.push(Q)})}await d.listMessage(C)}else if(E.includes(\"[buttons]\")){let C={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},O=E.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),N=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),_=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),L=E.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);N&&(C.title=N[1].trim()),O&&(C.thumbnailUrl=O[1].trim()),_&&(C.description=_[1].trim()),L&&(C.footer=L[1].trim());let q={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[H,V]of Object.entries(q)){let G;for(;(G=V.exec(E))!==null;){let J=G[1].trim(),Q={type:H};switch(H){case\"pix\":Q.currency=J.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.name=J.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.keyType=J.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.key=J.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.id=J.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.copyCode=J.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.phoneNumber=J.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.url=J.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(Q).length>1&&C.buttons.push(Q)}}await d.buttonMessage(C)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:E},!1);$(\"/message/sendText\")}w.type===\"image\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"image\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"video\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"video\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"audio\"&&(await d.audioWhatsapp({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,encoding:!0,audio:w.content.url},!1),$(\"/message/sendWhatsAppAudio\"));let I=a(f,w.id);I&&await new Promise(E=>setTimeout(E,I*1e3))}if(console.log(\"input\",m),m){if(m.type===\"choice input\"){let w=\"\",I=m.items;for(let E of I)w+=
;if(w=w.replace(/\\n$/,\"\"),w.includes(\"[list]\")){let E={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},C=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),O=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),N=w.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),_=w.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);C&&(E.title=C[1].trim()),O&&(E.description=O[1].trim()),N&&(E.buttonText=N[1].trim()),_&&(E.footerText=_[1].trim());let L=w.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(L){let q=L.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);q&&q.forEach(H=>{let V=H.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),G=H.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),J={title:V,rows:G?.map(Q=>({title:Q.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Q.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Q.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};E.sections.push(J)})}await d.listMessage(E)}else if(w.includes(\"[buttons]\")){let E={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},C=w.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),O=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),_=w.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);O&&(E.title=O[1].trim()),C&&(E.thumbnailUrl=C[1].trim()),N&&(E.description=N[1].trim()),_&&(E.footer=_[1].trim());let L={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[q,H]of Object.entries(L)){let V;for(;(V=H.exec(w))!==null;){let G=V[1].trim(),J={type:q};switch(q){case\"pix\":J.currency=G.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.name=G.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.keyType=G.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.key=G.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.id=G.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.copyCode=G.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.phoneNumber=G.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.url=G.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(J).length>1&&E.buttons.push(J)}}await d.buttonMessage(E)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:w},!1);$(\"/message/sendText\")}await S.integrationSession.update({\n where: {\n instanceId: \"72b92e28-1ee4-4e3d-aac5-eeb0b91486bc\",\n remoteJid: undefined,\n keyId: \"3EB0B239C45C50E580A669685B84A0A50F99D16D\"\n },\n take: undefined,\n + skip: Int\n })\n\nArgument
Retornar o status da mensagem no endpoint /chat/findStatusMessage/
No response
2.2.0
Docker
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Welcome!
What did you do?
{
"status": 500,
"error": "Internal Server Error",
"response": {
"message": "\nInvalid
S.integrationSession.update()
invocation in\n/evolution/dist/main.js:161:17468\n\n 158));let g=\"\";d.bold&&(g+=\"*\"),d.italic&&(g+=\"_\"),d.underline&&(g+=\"~\");let h=
${g}${l}${g.split("").reverse().join("")};return d.url&&(h=d.children[0]?.text?
[${h}]\n 159 (${d.url}):
${d.url}),h}async function u(d,l,g,h,m,f,b,S){for(let w of h){if(w.type===\"text\"){let E=\"\";for(let C of w.content.richText){for(let O of C.children)E+=b(O);E+=
\n 160}if(E=E.replace(/\\*\\*/g,\"\").replace(/__/,\"\").replace(/~~/,\"\").replace(/\\n$/,\"\"),E=E.replace(/\\n$/,\"\"),E.includes(\"[list]\")){let C={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},O=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),_=E.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),L=E.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);O&&(C.title=O[1].trim()),N&&(C.description=N[1].trim()),_&&(C.buttonText=_[1].trim()),L&&(C.footerText=L[1].trim());let q=E.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(q){let H=q.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);H&&H.forEach(V=>{let G=V.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),J=V.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),Q={title:G,rows:J?.map(Tn=>({title:Tn.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Tn.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Tn.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};C.sections.push(Q)})}await d.listMessage(C)}else if(E.includes(\"[buttons]\")){let C={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},O=E.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),N=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),_=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),L=E.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);N&&(C.title=N[1].trim()),O&&(C.thumbnailUrl=O[1].trim()),_&&(C.description=_[1].trim()),L&&(C.footer=L[1].trim());let q={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[H,V]of Object.entries(q)){let G;for(;(G=V.exec(E))!==null;){let J=G[1].trim(),Q={type:H};switch(H){case\"pix\":Q.currency=J.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.name=J.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.keyType=J.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.key=J.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.id=J.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.copyCode=J.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.phoneNumber=J.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.url=J.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(Q).length>1&&C.buttons.push(Q)}}await d.buttonMessage(C)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:E},!1);$(\"/message/sendText\")}w.type===\"image\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"image\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"video\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"video\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"audio\"&&(await d.audioWhatsapp({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,encoding:!0,audio:w.content.url},!1),$(\"/message/sendWhatsAppAudio\"));let I=a(f,w.id);I&&await new Promise(E=>setTimeout(E,I*1e3))}if(console.log(\"input\",m),m){if(m.type===\"choice input\"){let w=\"\",I=m.items;for(let E of I)w+=
\u25B6\uFE0F ${E.content}\n→ 161;if(w=w.replace(/\\n$/,\"\"),w.includes(\"[list]\")){let E={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},C=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),O=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),N=w.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),_=w.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);C&&(E.title=C[1].trim()),O&&(E.description=O[1].trim()),N&&(E.buttonText=N[1].trim()),_&&(E.footerText=_[1].trim());let L=w.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(L){let q=L.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);q&&q.forEach(H=>{let V=H.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),G=H.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),J={title:V,rows:G?.map(Q=>({title:Q.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Q.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Q.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};E.sections.push(J)})}await d.listMessage(E)}else if(w.includes(\"[buttons]\")){let E={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},C=w.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),O=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),_=w.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);O&&(E.title=O[1].trim()),C&&(E.thumbnailUrl=C[1].trim()),N&&(E.description=N[1].trim()),_&&(E.footer=_[1].trim());let L={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[q,H]of Object.entries(L)){let V;for(;(V=H.exec(w))!==null;){let G=V[1].trim(),J={type:q};switch(q){case\"pix\":J.currency=G.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.name=G.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.keyType=G.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.key=G.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.id=G.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.copyCode=G.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.phoneNumber=G.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.url=G.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(J).length>1&&E.buttons.push(J)}}await d.buttonMessage(E)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:w},!1);$(\"/message/sendText\")}await S.integrationSession.update({\n where: {\n instanceId: \"72b92e28-1ee4-4e3d-aac5-eeb0b91486bc\",\n remoteJid: undefined,\n keyId: \"3EB0B239C45C50E580A669685B84A0A50F99D16D\"\n },\n take: undefined,\n + skip: Int\n })\n\nArgument
skip` is missing."}
}
What did you expect?
Retornar o status da mensagem no endpoint /chat/findStatusMessage/
What did you observe instead of what you expected?
{
"status": 500,
"error": "Internal Server Error",
"response": {
"message": "\nInvalid
S.integrationSession.update()
invocation in\n/evolution/dist/main.js:161:17468\n\n 158));let g=\"\";d.bold&&(g+=\"*\"),d.italic&&(g+=\"_\"),d.underline&&(g+=\"~\");let h=
${g}${l}${g.split("").reverse().join("")};return d.url&&(h=d.children[0]?.text?
[${h}]\n 159 (${d.url}):
${d.url}),h}async function u(d,l,g,h,m,f,b,S){for(let w of h){if(w.type===\"text\"){let E=\"\";for(let C of w.content.richText){for(let O of C.children)E+=b(O);E+=
\n 160}if(E=E.replace(/\\*\\*/g,\"\").replace(/__/,\"\").replace(/~~/,\"\").replace(/\\n$/,\"\"),E=E.replace(/\\n$/,\"\"),E.includes(\"[list]\")){let C={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},O=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),_=E.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),L=E.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);O&&(C.title=O[1].trim()),N&&(C.description=N[1].trim()),_&&(C.buttonText=_[1].trim()),L&&(C.footerText=L[1].trim());let q=E.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(q){let H=q.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);H&&H.forEach(V=>{let G=V.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),J=V.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),Q={title:G,rows:J?.map(Tn=>({title:Tn.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Tn.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Tn.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};C.sections.push(Q)})}await d.listMessage(C)}else if(E.includes(\"[buttons]\")){let C={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},O=E.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),N=E.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),_=E.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),L=E.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);N&&(C.title=N[1].trim()),O&&(C.thumbnailUrl=O[1].trim()),_&&(C.description=_[1].trim()),L&&(C.footer=L[1].trim());let q={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[H,V]of Object.entries(q)){let G;for(;(G=V.exec(E))!==null;){let J=G[1].trim(),Q={type:H};switch(H){case\"pix\":Q.currency=J.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.name=J.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.keyType=J.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.key=J.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.id=J.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.copyCode=J.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.phoneNumber=J.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":Q.displayText=J.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),Q.url=J.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(Q).length>1&&C.buttons.push(Q)}}await d.buttonMessage(C)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:E},!1);$(\"/message/sendText\")}w.type===\"image\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"image\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"video\"&&(await d.mediaMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,mediatype:\"video\",media:w.content.url},null,!1),$(\"/message/sendMedia\")),w.type===\"audio\"&&(await d.audioWhatsapp({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,encoding:!0,audio:w.content.url},!1),$(\"/message/sendWhatsAppAudio\"));let I=a(f,w.id);I&&await new Promise(E=>setTimeout(E,I*1e3))}if(console.log(\"input\",m),m){if(m.type===\"choice input\"){let w=\"\",I=m.items;for(let E of I)w+=
\u25B6\uFE0F ${E.content}\n→ 161;if(w=w.replace(/\\n$/,\"\"),w.includes(\"[list]\")){let E={number:s.split(\"@\")[0],title:\"\",description:\"\",buttonText:\"\",footerText:\"\",sections:[]},C=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),O=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[buttonText\\])/),N=w.match(/\\[buttonText\\]([\\s\\S]*?)(?=\\[footerText\\])/),_=w.match(/\\[footerText\\]([\\s\\S]*?)(?=\\[menu\\])/);C&&(E.title=C[1].trim()),O&&(E.description=O[1].trim()),N&&(E.buttonText=N[1].trim()),_&&(E.footerText=_[1].trim());let L=w.match(/\\[menu\\]([\\s\\S]*?)\\[\\/menu\\]/)?.[1];if(L){let q=L.match(/\\[section\\]([\\s\\S]*?)(?=\\[section\\]|\\[\\/section\\]|\\[\\/menu\\])/g);q&&q.forEach(H=>{let V=H.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),G=H.match(/\\[row\\]([\\s\\S]*?)(?=\\[row\\]|\\[\\/row\\]|\\[\\/section\\]|\\[\\/menu\\])/g),J={title:V,rows:G?.map(Q=>({title:Q.match(/title: (.*?)(?:\\n|$)/)?.[1]?.trim(),description:Q.match(/description: (.*?)(?:\\n|$)/)?.[1]?.trim(),rowId:Q.match(/rowId: (.*?)(?:\\n|$)/)?.[1]?.trim()}))||[]};E.sections.push(J)})}await d.listMessage(E)}else if(w.includes(\"[buttons]\")){let E={number:s.split(\"@\")[0],thumbnailUrl:void 0,title:\"\",description:\"\",footer:\"\",buttons:[]},C=w.match(/\\[thumbnailUrl\\]([\\s\\S]*?)(?=\\[title\\])/),O=w.match(/\\[title\\]([\\s\\S]*?)(?=\\[description\\])/),N=w.match(/\\[description\\]([\\s\\S]*?)(?=\\[footer\\])/),_=w.match(/\\[footer\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url))/);O&&(E.title=O[1].trim()),C&&(E.thumbnailUrl=C[1].trim()),N&&(E.description=N[1].trim()),_&&(E.footer=_[1].trim());let L={reply:/\\[reply\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,pix:/\\[pix\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,copy:/\\[copy\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,call:/\\[call\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g,url:/\\[url\\]([\\s\\S]*?)(?=\\[(?:reply|pix|copy|call|url)|$)/g};for(let[q,H]of Object.entries(L)){let V;for(;(V=H.exec(w))!==null;){let G=V[1].trim(),J={type:q};switch(q){case\"pix\":J.currency=G.match(/currency: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.name=G.match(/name: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.keyType=G.match(/keyType: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.key=G.match(/key: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"reply\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.id=G.match(/id: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"copy\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.copyCode=G.match(/copyCode: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"call\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.phoneNumber=G.match(/phone: (.*?)(?:\\n|$)/)?.[1]?.trim();break;case\"url\":J.displayText=G.match(/displayText: (.*?)(?:\\n|$)/)?.[1]?.trim(),J.url=G.match(/url: (.*?)(?:\\n|$)/)?.[1]?.trim();break}Object.keys(J).length>1&&E.buttons.push(J)}}await d.buttonMessage(E)}else await d.textMessage({number:s.split(\"@\")[0],delay:g?.delayMessage||1e3,text:w},!1);$(\"/message/sendText\")}await S.integrationSession.update({\n where: {\n instanceId: \"72b92e28-1ee4-4e3d-aac5-eeb0b91486bc\",\n remoteJid: undefined,\n keyId: \"3EB0B239C45C50E580A669685B84A0A50F99D16D\"\n },\n take: undefined,\n + skip: Int\n })\n\nArgument
skip` is missing."}
}
Screenshots/Videos
No response
Which version of the API are you using?
2.2.0
What is your environment?
Docker
Other environment specifications
No response
If applicable, paste the log output
No response
Additional Notes
No response
The text was updated successfully, but these errors were encountered: