From 5a0ccc8b173709222af4f2167ab46566464570dc Mon Sep 17 00:00:00 2001 From: Antoine Schaller Date: Tue, 29 Dec 2020 00:14:45 +0100 Subject: [PATCH] feat: added starred indicator to messages (#501) Co-authored-by: Pedro S. Lopez --- index.d.ts | 2 ++ src/structures/Message.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/index.d.ts b/index.d.ts index 930f193..886b783 100644 --- a/index.d.ts +++ b/index.d.ts @@ -481,6 +481,8 @@ declare namespace WAWebJS { id: MessageId, /** Indicates if the message was forwarded */ isForwarded: boolean, + /** Indicates if the message was starred */ + isStarred: boolean, /** Location information contained in the message, if the message is type "location" */ location: Location, /** List of vCards contained in the message */ diff --git a/src/structures/Message.js b/src/structures/Message.js index 45112d4..02affb1 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -93,6 +93,12 @@ class Message extends Base { */ this.isStatus = data.isStatusV3; + /** + * Indicates if the message was stared + * @type {boolean} + */ + this.isStarred = data.star; + /** * Indicates if the message was a broadcast * @type {boolean}