mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-01-14 07:42:27 -06:00
feat: Added update message endpoint
This commit is contained in:
@@ -85,6 +85,7 @@ import {
|
||||
PrivacySettingDto,
|
||||
ReadMessageDto,
|
||||
SendPresenceDto,
|
||||
UpdateMessageDto,
|
||||
WhatsAppNumberDto,
|
||||
} from '../dto/chat.dto';
|
||||
import {
|
||||
@@ -3529,6 +3530,21 @@ export class WAStartupService {
|
||||
}
|
||||
}
|
||||
|
||||
public async updateMessage(data: UpdateMessageDto) {
|
||||
try {
|
||||
const jid = this.createJid(data.number);
|
||||
|
||||
this.logger.verbose('Updating message');
|
||||
return await this.client.sendMessage(jid, {
|
||||
text: data.text,
|
||||
edit: data.key,
|
||||
});
|
||||
} catch (error) {
|
||||
this.logger.error(error);
|
||||
throw new BadRequestException(error.toString());
|
||||
}
|
||||
}
|
||||
|
||||
// Group
|
||||
public async createGroup(create: CreateGroupDto) {
|
||||
this.logger.verbose('Creating group: ' + create.subject);
|
||||
|
||||
Reference in New Issue
Block a user