diff --git a/src/structures/Contact.js b/src/structures/Contact.js index 3b4b4b5..ccaf682 100644 --- a/src/structures/Contact.js +++ b/src/structures/Contact.js @@ -59,6 +59,36 @@ class Contact extends Base { this.verifiedLevel = data.verifiedLevel; this.verifiedName = data.verifiedName; + /** + * Indicates if the contact is the current user's contact + * @type {boolean} + */ + this.isMe = data.isMe; + + /** + * Indicates if the contact is a user contact + * @type {boolean} + */ + this.isUser = data.isUser; + + /** + * Indicates if the contact is a group contact + * @type {boolean} + */ + this.isGroup = data.isGroup; + + /** + * Indicates if the number is registered on WhatsApp + * @type {boolean} + */ + this.isWAContact = data.isWAContact; + + /** + * Indicates if the number is saved in the current phone's contacts + * @type {boolean} + */ + this.isMyContact = data.isMyContact; + return super._patch(data); } diff --git a/src/util/Injected.js b/src/util/Injected.js index a78b4c2..99d0be1 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -140,6 +140,12 @@ exports.LoadUtils = () => { res.businessProfile = contact.businessProfile.serialize(); } + res.isMe = contact.isMe; + res.isUser = contact.isUser; + res.isGroup = contact.isGroup; + res.isWAContact = contact.isWAContact; + res.isMyContact = contact.isMyContact; + return res; };