|
1 | 1 | import { InstanceDto } from '@api/dto/instance.dto'; |
2 | 2 | import { |
3 | | - OfferCallDto, |
4 | 3 | SendAudioDto, |
5 | 4 | SendButtonDto, |
6 | 5 | SendContactDto, |
@@ -49,13 +48,13 @@ export class SendMessageController { |
49 | 48 |
|
50 | 49 | public async sendWhatsAppAudio({ instanceName }: InstanceDto, data: SendAudioDto, file?: any) { |
51 | 50 | if (file?.buffer || isURL(data.audio) || isBase64(data.audio)) { |
52 | | - // Si file existe y tiene buffer, o si es una URL o Base64, continúa |
53 | | - return await this.waMonitor.waInstances[instanceName].audioWhatsapp(data, file); |
| 51 | + // Si file existe y tiene buffer, o si es una URL o Base64, continúa |
| 52 | + return await this.waMonitor.waInstances[instanceName].audioWhatsapp(data, file); |
54 | 53 | } else { |
55 | | - console.error('El archivo no tiene buffer o el audio no es una URL o Base64 válida'); |
56 | | - throw new BadRequestException('Owned media must be a url, base64, or valid file with buffer'); |
| 54 | + console.error('El archivo no tiene buffer o el audio no es una URL o Base64 válida'); |
| 55 | + throw new BadRequestException('Owned media must be a url, base64, or valid file with buffer'); |
57 | 56 | } |
58 | | -} |
| 57 | + } |
59 | 58 |
|
60 | 59 | public async sendButtons({ instanceName }: InstanceDto, data: SendButtonDto) { |
61 | 60 | return await this.waMonitor.waInstances[instanceName].buttonMessage(data); |
@@ -87,8 +86,4 @@ export class SendMessageController { |
87 | 86 | public async sendStatus({ instanceName }: InstanceDto, data: SendStatusDto, file?: any) { |
88 | 87 | return await this.waMonitor.waInstances[instanceName].statusMessage(data, file); |
89 | 88 | } |
90 | | - |
91 | | - public async offerCall({ instanceName }: InstanceDto, data: OfferCallDto) { |
92 | | - return await this.waMonitor.waInstances[instanceName].offerCall(data); |
93 | | - } |
94 | 89 | } |
0 commit comments