Skip to content

Commit

Permalink
🚀-next
Browse files Browse the repository at this point in the history
🚀-next
  • Loading branch information
leifermendez authored May 22, 2023
2 parents c32aec1 + 1110f26 commit a5ca2aa
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/docs/src/routes/docs/layout!.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default component$(() => {
<div class={'max-w-8xl'}>
<div
class={
'hidden lg:block fixed z-20 inset-0 top-[4rem] left-[max(0px,calc(50%-48rem))] right-auto w-[14.5rem] py-5 px-8 overflow-y-auto'
'hidden lg:block fixed z-20 inset-0 top-[4rem] right-auto w-[14.5rem] py-5 px-8 overflow-y-auto'
}
>
<NavBar options={store} />
Expand All @@ -33,7 +33,7 @@ export default component$(() => {
</div>
<div
class={
'hidden lg:block fixed z-20 inset-0 top-[4rem] right-[max(0px,calc(50%-48rem))] left-auto w-[14.5rem] py-5 px-8 overflow-y-auto'
'hidden lg:block fixed z-20 inset-0 top-[4rem] left-auto w-[14.5rem] py-5 px-8 overflow-y-auto'
}
>
<ExtraBar />
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/routes/docs/requirements/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ v18.12.1

- **Windows**: [Ver video](https://youtu.be/xRXHQlqA3Ak?t=376). Si necesitas ayuda para instalar Node en Windows. A continuación te comparto un video en el minuto exacto donde explico como instalar.
- **Ubuntu**: Te comparto un recurso de **[Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04-es)** donde explica como instalar node en Ubuntu.
- **Mac-Os**: Te comparto un recurso de **[Digital Ocean] (https://www.digitalocean.com/community/tutorials/how-to-install-node-js-and-create-a-local-development-environment-on-macos)** donde explica como instalar node en Mac-Os.
- **Mac-Os**: Te comparto un recurso de **[Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-and-create-a-local-development-environment-on-macos)** donde explica como instalar node en Mac-Os.

---

Expand Down
47 changes: 47 additions & 0 deletions packages/provider/src/meta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class MetaProvider extends ProviderClass {
sendtext = async (number, message) => {
const body = {
messaging_product: 'whatsapp',
recipient_type: 'individual',
to: number,
type: 'text',
text: {
Expand Down Expand Up @@ -120,6 +121,52 @@ class MetaProvider extends ProviderClass {
}
return this.sendMessageMeta(body)
}

/**
* Enviar listas alternativo
* @param {*} number
* @param {*} header
* @param {*} text
* @param {*} footer
* @param {*} button
* @param {*} list
* @returns
*/
sendList = async (number, header, text, footer, button, list) => {
const parseList = list.map((list) => ({
title: list.title,
rows: list.rows.map(row => ({
id: row.id,
title: row.title,
description: row.description
}))
}))

const body = {
messaging_product: 'whatsapp',
recipient_type: 'individual',
to: number,
type: 'interactive',
interactive: {
type: 'list',
header: {
type: 'text',
text: header,
},
body: {
text: text,
},
footer: {
text: footer,
},
action: {
button: button,
sections: parseList
},
},
};
return this.sendMessageMeta(body)
}
/**
* Enviar buttons
* @param {*} number
Expand Down

0 comments on commit a5ca2aa

Please sign in to comment.