mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
Merge pull request #1366 from adaptwebtech/hotfix_chatname
Corrigindo um bug ao atualizar o push name no evento MESSAGES_UPSERT e MESSAGES_UPDATE
This commit is contained in:
commit
2ded19752f
@ -1226,6 +1226,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
received.pushName &&
|
||||
existingChat.name !== received.pushName &&
|
||||
received.pushName.trim().length > 0 &&
|
||||
!received.key.fromMe &&
|
||||
!received.key.remoteJid.includes('@g.us')
|
||||
) {
|
||||
this.sendDataWebhook(Events.CHATS_UPSERT, [{ ...existingChat, name: received.pushName }]);
|
||||
@ -1585,7 +1586,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
const chatToInsert = {
|
||||
remoteJid: message.remoteJid,
|
||||
instanceId: this.instanceId,
|
||||
name: message.pushName || '',
|
||||
unreadMessages: 0,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user