mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
test: status/stories
This commit is contained in:
parent
41fa700fb3
commit
3cf0ced62e
@ -27,6 +27,7 @@
|
||||
* Fixed require fileName for document only in base64 for send media message
|
||||
* Bug fix when sending mobile message change contact name to number in chatwoot
|
||||
* Bug fix when connecting whatsapp does not send confirmation message
|
||||
* Fixed quoted message with id or message directly
|
||||
|
||||
### Integrations
|
||||
|
||||
|
@ -82,8 +82,8 @@ const quotedOptionsSchema: JSONSchema7 = {
|
||||
remoteJid: { type: 'string' },
|
||||
fromMe: { type: 'boolean', enum: [true, false] },
|
||||
},
|
||||
required: ['id', 'remoteJid', 'fromMe'],
|
||||
...isNotEmpty('id', 'remoteJid'),
|
||||
required: ['id'],
|
||||
...isNotEmpty('id'),
|
||||
},
|
||||
message: { type: 'object' },
|
||||
},
|
||||
|
@ -11,7 +11,6 @@ import {
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { cache, waMonitor } from '../whatsapp.module';
|
||||
import { Database, Redis, configService } from '../../config/env.config';
|
||||
import { RedisCache } from '../../db/redis.client';
|
||||
|
||||
async function getInstance(instanceName: string) {
|
||||
const db = configService.get<Database>('DATABASE');
|
||||
|
@ -936,7 +936,7 @@ export class ChatwootService {
|
||||
|
||||
const command = messageReceived.replace('/', '');
|
||||
|
||||
if (command === 'init') {
|
||||
if (command === 'init' || command === 'iniciar') {
|
||||
this.logger.verbose('command init found');
|
||||
const state = waInstance?.connectionStatus?.state;
|
||||
|
||||
@ -977,7 +977,7 @@ export class ChatwootService {
|
||||
}
|
||||
}
|
||||
|
||||
if (command === 'disconnect') {
|
||||
if (command === 'disconnect' || command === 'desconectar') {
|
||||
this.logger.verbose('command disconnect found');
|
||||
|
||||
const msgLogout = `🚨 Disconnecting Whatsapp from inbox *${body.inbox.name}*: `;
|
||||
|
@ -1480,7 +1480,17 @@ export class WAStartupService {
|
||||
let quoted: WAMessage;
|
||||
|
||||
if (options?.quoted) {
|
||||
quoted = options?.quoted;
|
||||
const m = options?.quoted;
|
||||
|
||||
const msg = m?.message
|
||||
? m
|
||||
: ((await this.getMessage(m.key, true)) as proto.IWebMessageInfo);
|
||||
|
||||
if (!msg) {
|
||||
throw 'Message not found';
|
||||
}
|
||||
|
||||
quoted = msg;
|
||||
this.logger.verbose('Quoted message');
|
||||
}
|
||||
|
||||
@ -1776,8 +1786,10 @@ export class WAStartupService {
|
||||
|
||||
public async statusMessage(data: SendStatusDto) {
|
||||
this.logger.verbose('Sending status message');
|
||||
const status = await this.formatStatusMessage(data.statusMessage);
|
||||
|
||||
return await this.sendMessageWithTyping('status@broadcast', {
|
||||
status: await this.formatStatusMessage(data.statusMessage),
|
||||
status,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user