added url in vcard

This commit is contained in:
Davidson Gomes 2023-07-05 21:20:04 -03:00
parent a216c9cc37
commit 2338787dbb
3 changed files with 6 additions and 0 deletions

View File

@ -381,6 +381,7 @@ export const contactMessageSchema: JSONSchema7 = {
phoneNumber: { type: 'string', minLength: 10 },
organization: { type: 'string' },
email: { type: 'string' },
url: { type: 'string' },
},
required: ['fullName', 'wuid', 'phoneNumber'],
...isNotEmpty('fullName'),

View File

@ -127,6 +127,7 @@ export class ContactMessage {
phoneNumber: string;
organization?: string;
email?: string;
url?: string;
}
export class SendContactDto extends Metadata {
contactMessage: ContactMessage[];

View File

@ -1439,6 +1439,10 @@ export class WAStartupService {
result += `EMAIL:${contact.email}\n`;
}
if (contact.url) {
result += `URL:${contact.url}\n`;
}
result +=
`item1.TEL;waid=${contact.wuid}:${contact.phoneNumber}\n` +
'item1.X-ABLabel:Celular\n' +