@open-wa/wa-automate 4.36.2 → 4.36.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/Client.d.ts +4 -3
- package/dist/api/Client.js +7 -2
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -386,12 +386,13 @@ export declare class Client {
|
|
386
386
|
* Send VCARD
|
387
387
|
*
|
388
388
|
* @param {string} chatId '000000000000@c.us'
|
389
|
-
* @param {string} vcard vcard as a string
|
390
|
-
* @param {string} contactName The display name for the contact.
|
389
|
+
* @param {string} vcard vcard as a string, you can send multiple contacts vcard also.
|
390
|
+
* @param {string} contactName The display name for the contact. Ignored on multiple vcards
|
391
391
|
* @param {string} contactNumber If supplied, this will be injected into the vcard (VERSION 3 ONLY FROM VCARDJS) with the WA id to make it show up with the correct buttons on WA. The format of this param should be including country code, without any other formating. e.g:
|
392
392
|
* `4477777777777`
|
393
|
+
* Ignored on multiple vcards
|
393
394
|
*/
|
394
|
-
sendVCard(chatId: ChatId, vcard: string, contactName
|
395
|
+
sendVCard(chatId: ChatId, vcard: string, contactName?: string, contactNumber?: string): Promise<boolean>;
|
395
396
|
/**
|
396
397
|
* Set your profile name
|
397
398
|
*
|
package/dist/api/Client.js
CHANGED
@@ -1062,10 +1062,11 @@ class Client {
|
|
1062
1062
|
* Send VCARD
|
1063
1063
|
*
|
1064
1064
|
* @param {string} chatId '000000000000@c.us'
|
1065
|
-
* @param {string} vcard vcard as a string
|
1066
|
-
* @param {string} contactName The display name for the contact.
|
1065
|
+
* @param {string} vcard vcard as a string, you can send multiple contacts vcard also.
|
1066
|
+
* @param {string} contactName The display name for the contact. Ignored on multiple vcards
|
1067
1067
|
* @param {string} contactNumber If supplied, this will be injected into the vcard (VERSION 3 ONLY FROM VCARDJS) with the WA id to make it show up with the correct buttons on WA. The format of this param should be including country code, without any other formating. e.g:
|
1068
1068
|
* `4477777777777`
|
1069
|
+
* Ignored on multiple vcards
|
1069
1070
|
*/
|
1070
1071
|
sendVCard(chatId, vcard, contactName, contactNumber) {
|
1071
1072
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -2188,6 +2189,10 @@ class Client {
|
|
2188
2189
|
return __awaiter(this, void 0, void 0, function* () {
|
2189
2190
|
const membersIds = yield this.getGroupMembersId(groupId);
|
2190
2191
|
logging_1.log.info("group members ids", membersIds);
|
2192
|
+
if (!Array.isArray(membersIds)) {
|
2193
|
+
console.error("group members ids is not an array", membersIds);
|
2194
|
+
return [];
|
2195
|
+
}
|
2191
2196
|
const actions = membersIds.map(memberId => {
|
2192
2197
|
return this.getContact(memberId);
|
2193
2198
|
});
|
package/package.json
CHANGED