feat: boolean for indicating Status update messages (#396)

This commit is contained in:
Pedro S. Lopez
2020-10-26 00:45:09 -04:00
committed by GitHub
parent 20e07c43d7
commit 42dd866a53
3 changed files with 10 additions and 0 deletions

2
index.d.ts vendored
View File

@@ -444,6 +444,8 @@ declare namespace WAWebJS {
body: string,
/** Indicates if the message was a broadcast */
broadcast: boolean,
/** Indicates if the message was a status update */
isStatus: boolean,
/** ID for the Chat that this message was sent to, except if the message was sent by the current user */
from: string,
/** Indicates if the message was sent by the current user */

View File

@@ -87,6 +87,12 @@ class Message extends Base {
*/
this.isForwarded = data.isForwarded;
/**
* Indicates if the message is a status update
* @type {boolean}
*/
this.isStatus = data.isStatusV3;
/**
* Indicates if the message was a broadcast
* @type {boolean}

View File

@@ -204,6 +204,8 @@ exports.LoadUtils = () => {
window.WWebJS.getMessageModel = message => {
const msg = message.serialize();
msg.isStatusV3 = message.isStatusV3;
delete msg.pendingAckUpdate;
return msg;
};