mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-21 21:19:16 +00:00
fix: star() & unstar() functions (#547)
This commit is contained in:
@@ -291,7 +291,7 @@ class Message extends Base {
|
|||||||
* Stars this message
|
* Stars this message
|
||||||
*/
|
*/
|
||||||
async star() {
|
async star() {
|
||||||
await this.pupPage.evaluate((msgId) => {
|
await this.client.pupPage.evaluate((msgId) => {
|
||||||
let msg = window.Store.Msg.get(msgId);
|
let msg = window.Store.Msg.get(msgId);
|
||||||
|
|
||||||
if (msg.canStar()) {
|
if (msg.canStar()) {
|
||||||
@@ -304,7 +304,7 @@ class Message extends Base {
|
|||||||
* Unstars this message
|
* Unstars this message
|
||||||
*/
|
*/
|
||||||
async unstar() {
|
async unstar() {
|
||||||
await this.pupPage.evaluate((msgId) => {
|
await this.client.pupPage.evaluate((msgId) => {
|
||||||
let msg = window.Store.Msg.get(msgId);
|
let msg = window.Store.Msg.get(msgId);
|
||||||
|
|
||||||
if (msg.canStar()) {
|
if (msg.canStar()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user