mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-21 12:52:19 -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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user