mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
Merge pull request #926 from lopesfontana/v2.0.0-contacts_pushName
V2.0.0 contacts push name
This commit is contained in:
commit
168c5f18d8
@ -164,7 +164,7 @@ export class EvolutionStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
await this.updateContact({
|
await this.updateContact({
|
||||||
remoteJid: messageRaw.key.remoteJid,
|
remoteJid: messageRaw.key.remoteJid,
|
||||||
pushName: messageRaw.pushName,
|
pushName: messageRaw.key.fromMe ? '' : (messageRaw.key.fromMe == null ? '' : received.pushName),
|
||||||
profilePicUrl: received.profilePicUrl,
|
profilePicUrl: received.profilePicUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1180,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.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,
|
||||||
};
|
};
|
||||||
@ -1190,13 +1190,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: 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