Simplified chatMetadata based classes.
This commit is contained in:
parent
b8de76b448
commit
db3ec58ad9
|
|
@ -27,12 +27,7 @@ class chat extends chatMetadata{
|
|||
*/
|
||||
constructor(user, flair, highLevel, msg, type, links){
|
||||
//Call derived constructor
|
||||
super(flair, highLevel, msg, type, links);
|
||||
|
||||
/**
|
||||
* User who sent the message
|
||||
*/
|
||||
this.user = user;
|
||||
super(user, flair, highLevel, msg, type, links);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,13 +20,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
class chatMetadata{
|
||||
/**
|
||||
* Instantiates a chat metadata object
|
||||
* @param {String} user - Name of user who sent the message
|
||||
* @param {String} flair - Flair ID String for the flair used to send the message
|
||||
* @param {Number} highLevel - Number representing current high level
|
||||
* @param {String} msg - Contents of the message, with links replaced with numbered file-seperator markers
|
||||
* @param {String} type - Message Type Identifier, used for client-side processing.
|
||||
* @param {Array} links - Array of URLs/Links included in the message.
|
||||
*/
|
||||
constructor(flair, highLevel, msg, type, links){
|
||||
constructor(user, flair, highLevel, msg, type, links){
|
||||
/**
|
||||
* Name of user who sent the message
|
||||
*/
|
||||
this.user = user;
|
||||
|
||||
/**
|
||||
* Flair ID String for the flair used to send the message
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,12 +27,7 @@ class message extends chatMetadata{
|
|||
*/
|
||||
constructor(user, recipients, flair, highLevel, msg, type, links){
|
||||
//Call derived constructor
|
||||
super(flair, highLevel, msg, type, links);
|
||||
|
||||
/**
|
||||
* Name of user who sent the message
|
||||
*/
|
||||
this.user = user;
|
||||
super(user, flair, highLevel, msg, type, links);
|
||||
|
||||
/**
|
||||
* Array of usernames who are supposed to receive the message
|
||||
|
|
|
|||
Loading…
Reference in a new issue