Add group chat functions, slight refactoring

This commit is contained in:
Pedro Lopez
2019-02-20 02:42:19 -04:00
parent 594a65d5e8
commit 1b7376885d
12 changed files with 316 additions and 37 deletions

39
src/structures/Base.js Normal file
View File

@@ -0,0 +1,39 @@
'use strict';
/**
* Represents a WhatsApp data structure
*/
class Base {
constructor(client) {
/**
* The client that instantiated this
* @readonly
*/
Object.defineProperty(this, 'client', { value: client });
}
_clone() {
return Object.assign(Object.create(this), this);
}
_patch(data) { return data; }
/**
* Name that represents this model in the WhatsApp Web Store
* @readonly
*/
static get WAppModel() {
return this.name;
}
/**
* Extra fields to add to model serialization
* @readonly
*/
static get extraFields() {
return [];
}
}
module.exports = Base;