mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-21 21:19:16 +00:00
feat: boolean for indicating Status update messages (#396)
This commit is contained in:
2
index.d.ts
vendored
2
index.d.ts
vendored
@@ -444,6 +444,8 @@ declare namespace WAWebJS {
|
|||||||
body: string,
|
body: string,
|
||||||
/** Indicates if the message was a broadcast */
|
/** Indicates if the message was a broadcast */
|
||||||
broadcast: boolean,
|
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 */
|
/** ID for the Chat that this message was sent to, except if the message was sent by the current user */
|
||||||
from: string,
|
from: string,
|
||||||
/** Indicates if the message was sent by the current user */
|
/** Indicates if the message was sent by the current user */
|
||||||
|
|||||||
@@ -87,6 +87,12 @@ class Message extends Base {
|
|||||||
*/
|
*/
|
||||||
this.isForwarded = data.isForwarded;
|
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
|
* Indicates if the message was a broadcast
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
|
|||||||
@@ -204,6 +204,8 @@ exports.LoadUtils = () => {
|
|||||||
|
|
||||||
window.WWebJS.getMessageModel = message => {
|
window.WWebJS.getMessageModel = message => {
|
||||||
const msg = message.serialize();
|
const msg = message.serialize();
|
||||||
|
msg.isStatusV3 = message.isStatusV3;
|
||||||
|
|
||||||
delete msg.pendingAckUpdate;
|
delete msg.pendingAckUpdate;
|
||||||
return msg;
|
return msg;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user