mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
Gerar Wuid no SendContact
This commit is contained in:
parent
40c230c7db
commit
28c2c7285c
@ -398,7 +398,7 @@ export const contactMessageSchema: JSONSchema7 = {
|
||||
email: { type: 'string' },
|
||||
url: { type: 'string' },
|
||||
},
|
||||
required: ['fullName', 'wuid', 'phoneNumber'],
|
||||
required: ['fullName', 'phoneNumber'],
|
||||
...isNotEmpty('fullName'),
|
||||
},
|
||||
minItems: 1,
|
||||
|
@ -2125,6 +2125,11 @@ export class WAStartupService {
|
||||
result += `URL:${contact.url}\n`;
|
||||
}
|
||||
|
||||
if (!contact.wuid) {
|
||||
this.logger.verbose('Wuid defined');
|
||||
contact.wuid = this.createJid(contact.phoneNumber);
|
||||
}
|
||||
|
||||
result +=
|
||||
`item1.TEL;waid=${contact.wuid}:${contact.phoneNumber}\n` +
|
||||
'item1.X-ABLabel:Celular\n' +
|
||||
|
Loading…
Reference in New Issue
Block a user