Skip to content

Commit 2338787

Browse files
committed
added url in vcard
1 parent a216c9c commit 2338787

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/validate/validate.schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ export const contactMessageSchema: JSONSchema7 = {
381381
phoneNumber: { type: 'string', minLength: 10 },
382382
organization: { type: 'string' },
383383
email: { type: 'string' },
384+
url: { type: 'string' },
384385
},
385386
required: ['fullName', 'wuid', 'phoneNumber'],
386387
...isNotEmpty('fullName'),

src/whatsapp/dto/sendMessage.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export class ContactMessage {
127127
phoneNumber: string;
128128
organization?: string;
129129
email?: string;
130+
url?: string;
130131
}
131132
export class SendContactDto extends Metadata {
132133
contactMessage: ContactMessage[];

src/whatsapp/services/whatsapp.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,10 @@ export class WAStartupService {
14391439
result += `EMAIL:${contact.email}\n`;
14401440
}
14411441

1442+
if (contact.url) {
1443+
result += `URL:${contact.url}\n`;
1444+
}
1445+
14421446
result +=
14431447
`item1.TEL;waid=${contact.wuid}:${contact.phoneNumber}\n` +
14441448
'item1.X-ABLabel:Celular\n' +

0 commit comments

Comments
 (0)