Extends Contact to attach a WhatsApp business profile to a contact. Reuse when you need business metadata like category or description for a contact.
// Source: https://github.com/wwebjs/whatsapp-web.js | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
'use strict';
const Contact = require('./Contact');
/**
* Represents a Business Contact on WhatsApp
* @extends {Contact}
*/
class BusinessContact extends Contact {
_patch(data) {
/**
* The contact's business profile
*/
this.businessProfile = data.businessProfile;
return super._patch(data);
}
}
module.exports = BusinessContact;
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key