mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
Adjust contact pushName. Not save when in message.upsert and the pushName is from the instance name
This commit is contained in:
parent
ca2387cc70
commit
1e5d62c777
@ -1179,7 +1179,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
const contactRaw: { remoteJid: string; pushName: string; profilePicUrl?: string; instanceId: string } = {
|
const contactRaw: { remoteJid: string; pushName: string; profilePicUrl?: string; instanceId: string } = {
|
||||||
remoteJid: received.key.remoteJid,
|
remoteJid: received.key.remoteJid,
|
||||||
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : contact.pushName),
|
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : received.pushName),
|
||||||
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
||||||
instanceId: this.instanceId,
|
instanceId: this.instanceId,
|
||||||
};
|
};
|
||||||
@ -1189,13 +1189,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (contact) {
|
if (contact) {
|
||||||
const contactRaw: { remoteJid: string; pushName: string; profilePicUrl?: string; instanceId: string } = {
|
|
||||||
remoteJid: received.key.remoteJid,
|
|
||||||
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : contact.pushName),
|
|
||||||
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
|
||||||
instanceId: this.instanceId,
|
|
||||||
};
|
|
||||||
|
|
||||||
this.sendDataWebhook(Events.CONTACTS_UPDATE, contactRaw);
|
this.sendDataWebhook(Events.CONTACTS_UPDATE, contactRaw);
|
||||||
|
|
||||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled) {
|
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled) {
|
||||||
|
Loading…
Reference in New Issue
Block a user