mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
chore: Deprecate buttons and list in new Baileys version
Updated CHANGELOG.md, package.json, src/api/dto/chat.dto.ts, and src/api/services/channels/whatsapp.baileys.service.ts to deprecate buttons and list due to the new Baileys version. This change improves compatibility and maintainability of the codebase.
This commit is contained in:
parent
04f6e11cbd
commit
881a011493
@ -7,6 +7,7 @@
|
||||
* Update contacts database with unique index
|
||||
* Save chat name
|
||||
* Correction of media as attachments in chatwoot when using a Meta API Instance and not Baileys
|
||||
* Update Baileys version 6.7.6
|
||||
|
||||
# 2.0.9-rc (release candidate)
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
"@sentry/node": "^7.59.2",
|
||||
"amqplib": "^0.10.3",
|
||||
"axios": "^1.6.5",
|
||||
"baileys": "github:WhiskeySockets/Baileys",
|
||||
"baileys": "6.7.6",
|
||||
"class-validator": "^0.14.1",
|
||||
"compression": "^1.7.4",
|
||||
"cors": "^2.8.5",
|
||||
|
@ -1,4 +1,11 @@
|
||||
import { proto, WAPresence, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from 'baileys';
|
||||
import {
|
||||
proto,
|
||||
WAPresence,
|
||||
WAPrivacyGroupAddValue,
|
||||
WAPrivacyOnlineValue,
|
||||
WAPrivacyValue,
|
||||
WAReadReceiptsValue,
|
||||
} from 'baileys';
|
||||
|
||||
export class OnWhatsAppDto {
|
||||
constructor(
|
||||
@ -84,7 +91,7 @@ export class PrivacySettingDto {
|
||||
status: WAPrivacyValue;
|
||||
online: WAPrivacyOnlineValue;
|
||||
last: WAPrivacyValue;
|
||||
groupadd: WAPrivacyValue;
|
||||
groupadd: WAPrivacyGroupAddValue;
|
||||
}
|
||||
|
||||
export class DeleteMessage {
|
||||
|
@ -35,7 +35,6 @@ import {
|
||||
Options,
|
||||
SendAudioDto,
|
||||
SendContactDto,
|
||||
SendListDto,
|
||||
SendLocationDto,
|
||||
SendMediaDto,
|
||||
SendPollDto,
|
||||
@ -1551,7 +1550,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
|
||||
if (events['messaging-history.set']) {
|
||||
const payload = events['messaging-history.set'];
|
||||
this.messageHandle['messaging-history.set'](payload);
|
||||
this.messageHandle['messaging-history.set'](payload as any);
|
||||
}
|
||||
|
||||
if (events['messages.upsert']) {
|
||||
@ -2608,27 +2607,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
);
|
||||
}
|
||||
|
||||
public async listMessage(data: SendListDto) {
|
||||
return await this.sendMessageWithTyping(
|
||||
data.number,
|
||||
{
|
||||
listMessage: {
|
||||
title: data.title,
|
||||
description: data?.description,
|
||||
buttonText: data?.buttonText,
|
||||
footerText: data?.footerText,
|
||||
sections: data.sections,
|
||||
listType: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
delay: data?.delay,
|
||||
presence: 'composing',
|
||||
quoted: data?.quoted,
|
||||
mentionsEveryOne: data?.mentionsEveryOne,
|
||||
mentioned: data?.mentioned,
|
||||
},
|
||||
);
|
||||
public async listMessage() {
|
||||
throw new BadRequestException('Method not available on WhatsApp Baileys');
|
||||
}
|
||||
|
||||
public async contactMessage(data: SendContactDto) {
|
||||
|
Loading…
Reference in New Issue
Block a user