This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Requires=network.target | |
| PartOf=chatwoot.target | |
| [Service] | |
| Type=simple | |
| User=chatwoot | |
| WorkingDirectory=/home/chatwoot/chatwoot | |
| ExecStart=/bin/bash -lc 'bin/rails server -p $PORT -e $RAILS_ENV' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| switch (messageType) { | |
| case "audioMessage": | |
| switch (plano) { | |
| case "gold": | |
| if (await excedeuLimiteDiario(remoteJid, plano, userId)) { | |
| res.status(403).send("Você excedeu o limite diário de mensagens."); | |
| return; | |
| } | |
| await processarAudio(mensagem, remoteJid); | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function processarMensagemDeAudio(messageData) { | |
| try { | |
| console.log(messageData); | |
| const messageId = messageData.data.key.id; | |
| const owner = messageData.data.owner; | |
| console.log("messageId:", messageId); | |
| console.log("owner:", owner); | |
| const apiKey = '7C8A9F4E-8BA3-4AD3-BFB5-30DADFBD140E'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Stripe } from 'stripe'; | |
| import type { NextApiRequest, NextApiResponse } from 'next'; | |
| import getRawBody from 'raw-body'; | |
| export const config = { | |
| api: { | |
| bodyParser: false, | |
| }, | |
| }; |