Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:EvolutionAPI/evolution-api into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
DavidsonGomes committed Jul 24, 2023
2 parents f35b62e + 20abdd2 commit a73d5f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/validate/validate.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export const contactMessageSchema: JSONSchema7 = {
email: { type: 'string' },
url: { type: 'string' },
},
required: ['fullName', 'wuid', 'phoneNumber'],
required: ['fullName', 'phoneNumber'],
...isNotEmpty('fullName'),
},
minItems: 1,
Expand Down
5 changes: 5 additions & 0 deletions src/whatsapp/services/whatsapp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2277,6 +2277,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' +
Expand Down

0 comments on commit a73d5f4

Please sign in to comment.