Skip to content

Commit 449a3b2

Browse files
committed
Merge branch 'v2.0.0' of github.com:EvolutionAPI/evolution-api into v2.0.0
2 parents efbb32f + 168c5f1 commit 449a3b2

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/api/integrations/channel/evolution/evolution.channel.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class EvolutionStartupService extends ChannelStartupService {
164164

165165
await this.updateContact({
166166
remoteJid: messageRaw.key.remoteJid,
167-
pushName: messageRaw.pushName,
167+
pushName: messageRaw.key.fromMe ? '' : (messageRaw.key.fromMe == null ? '' : received.pushName),
168168
profilePicUrl: received.profilePicUrl,
169169
});
170170
}

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ export class BaileysStartupService extends ChannelStartupService {
11801180

11811181
const contactRaw: { remoteJid: string; pushName: string; profilePicUrl?: string; instanceId: string } = {
11821182
remoteJid: received.key.remoteJid,
1183-
pushName: received.pushName,
1183+
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : received.pushName),
11841184
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
11851185
instanceId: this.instanceId,
11861186
};
@@ -1190,13 +1190,6 @@ export class BaileysStartupService extends ChannelStartupService {
11901190
}
11911191

11921192
if (contact) {
1193-
const contactRaw: { remoteJid: string; pushName: string; profilePicUrl?: string; instanceId: string } = {
1194-
remoteJid: received.key.remoteJid,
1195-
pushName: contact.pushName,
1196-
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
1197-
instanceId: this.instanceId,
1198-
};
1199-
12001193
this.sendDataWebhook(Events.CONTACTS_UPDATE, contactRaw);
12011194

12021195
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled) {

0 commit comments

Comments
 (0)