diff --git a/index.d.ts b/index.d.ts index 4faf221..fbce68f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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 */ diff --git a/src/structures/Message.js b/src/structures/Message.js index 7ee8012..4eaaba2 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -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} diff --git a/src/util/Injected.js b/src/util/Injected.js index 2b78ece..dabc6ea 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -204,6 +204,8 @@ exports.LoadUtils = () => { window.WWebJS.getMessageModel = message => { const msg = message.serialize(); + msg.isStatusV3 = message.isStatusV3; + delete msg.pendingAckUpdate; return msg; };