mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -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
4ca141b4f4
commit
ca2387cc70
@ -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 ? '' : messageRaw.pushName),
|
||||||
profilePicUrl: received.profilePicUrl,
|
profilePicUrl: received.profilePicUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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.pushName,
|
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : contact.pushName),
|
||||||
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
||||||
instanceId: this.instanceId,
|
instanceId: this.instanceId,
|
||||||
};
|
};
|
||||||
@ -1191,7 +1191,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
if (contact) {
|
if (contact) {
|
||||||
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: contact.pushName,
|
pushName: received.key.fromMe ? '' : (received.key.fromMe == null ? '' : contact.pushName),
|
||||||
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
profilePicUrl: (await this.profilePicture(received.key.remoteJid)).profilePictureUrl,
|
||||||
instanceId: this.instanceId,
|
instanceId: this.instanceId,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user