Merge pull request #1334 from adaptwebtech/fix_and_add_name_to_find_chats_and_paginate_get_contacts_and_get_chats

Corrigindo um bug no endpoint de findChats e permitindo paginação nos endpoints de findChats e findContacts
This commit is contained in:
Davidson Gomes
2025-03-26 10:34:56 -03:00
committed by GitHub
2 changed files with 22 additions and 3 deletions

View File

@@ -1223,7 +1223,8 @@ export class BaileysStartupService extends ChannelStartupService {
existingChat &&
received.pushName &&
existingChat.name !== received.pushName &&
received.pushName.trim().length > 0
received.pushName.trim().length > 0 &&
!received.key.remoteJid.includes('@g.us')
) {
this.sendDataWebhook(Events.CHATS_UPSERT, [{ ...existingChat, name: received.pushName }]);
if (this.configService.get<Database>('DATABASE').SAVE_DATA.CHATS) {