mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 12:12:55 -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
|
* Update contacts database with unique index
|
||||||
* Save chat name
|
* Save chat name
|
||||||
* Correction of media as attachments in chatwoot when using a Meta API Instance and not Baileys
|
* 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)
|
# 2.0.9-rc (release candidate)
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
"@sentry/node": "^7.59.2",
|
"@sentry/node": "^7.59.2",
|
||||||
"amqplib": "^0.10.3",
|
"amqplib": "^0.10.3",
|
||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
"baileys": "github:WhiskeySockets/Baileys",
|
"baileys": "6.7.6",
|
||||||
"class-validator": "^0.14.1",
|
"class-validator": "^0.14.1",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"cors": "^2.8.5",
|
"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 {
|
export class OnWhatsAppDto {
|
||||||
constructor(
|
constructor(
|
||||||
@ -84,7 +91,7 @@ export class PrivacySettingDto {
|
|||||||
status: WAPrivacyValue;
|
status: WAPrivacyValue;
|
||||||
online: WAPrivacyOnlineValue;
|
online: WAPrivacyOnlineValue;
|
||||||
last: WAPrivacyValue;
|
last: WAPrivacyValue;
|
||||||
groupadd: WAPrivacyValue;
|
groupadd: WAPrivacyGroupAddValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DeleteMessage {
|
export class DeleteMessage {
|
||||||
|
@ -35,7 +35,6 @@ import {
|
|||||||
Options,
|
Options,
|
||||||
SendAudioDto,
|
SendAudioDto,
|
||||||
SendContactDto,
|
SendContactDto,
|
||||||
SendListDto,
|
|
||||||
SendLocationDto,
|
SendLocationDto,
|
||||||
SendMediaDto,
|
SendMediaDto,
|
||||||
SendPollDto,
|
SendPollDto,
|
||||||
@ -1551,7 +1550,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
if (events['messaging-history.set']) {
|
if (events['messaging-history.set']) {
|
||||||
const payload = 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']) {
|
if (events['messages.upsert']) {
|
||||||
@ -2608,27 +2607,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async listMessage(data: SendListDto) {
|
public async listMessage() {
|
||||||
return await this.sendMessageWithTyping(
|
throw new BadRequestException('Method not available on WhatsApp Baileys');
|
||||||
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 contactMessage(data: SendContactDto) {
|
public async contactMessage(data: SendContactDto) {
|
||||||
|
Loading…
Reference in New Issue
Block a user