mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 14:47:45 -06:00
added organization name in vcard
This commit is contained in:
@@ -125,6 +125,7 @@ export class ContactMessage {
|
||||
fullName: string;
|
||||
wuid: string;
|
||||
phoneNumber: string;
|
||||
organization?: string;
|
||||
}
|
||||
export class SendContactDto extends Metadata {
|
||||
contactMessage: ContactMessage[];
|
||||
|
||||
@@ -1425,20 +1425,15 @@ export class WAStartupService {
|
||||
const message: proto.IMessage = {};
|
||||
|
||||
const vcard = (contact: ContactMessage) => {
|
||||
return (
|
||||
const result =
|
||||
'BEGIN:VCARD\n' +
|
||||
'VERSION:3.0\n' +
|
||||
'FN:' +
|
||||
contact.fullName +
|
||||
'\n' +
|
||||
'item1.TEL;waid=' +
|
||||
contact.wuid +
|
||||
':' +
|
||||
contact.phoneNumber +
|
||||
'\n' +
|
||||
'item1.X-ABLabel:Celular\n' +
|
||||
'END:VCARD'
|
||||
);
|
||||
`FN:${contact.fullName}\n` +
|
||||
`ORG:${contact.organization};\n` +
|
||||
`TEL;type=CELL;type=VOICE;waid=${contact.wuid}:${contact.wuid}\n` +
|
||||
'END:VCARD';
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
if (data.contactMessage.length === 1) {
|
||||
|
||||
Reference in New Issue
Block a user