Skip to content

Commit

Permalink
issue: groupchat is not being extended. privatechat is being returned…
Browse files Browse the repository at this point in the history
… on groups
  • Loading branch information
totallynotdavid committed Nov 19, 2024
1 parent 6b9f1ec commit 903d9bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion functions/whatsappClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ client.on(`message`, async message => {
}

/* Check if the sender is an admin of the group */
const participantsArray = Object.values(chatInfo.participants);
const participantsArray = chatInfo.participants || []; // This is not working. chatInfo is returning a PrivateChat object instead of a GroupChat object
const admins = participantsArray.filter(
participant => participant.isAdmin
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"spotify-web-api-node": "^5.0.2",
"sqlite3": "^5.1.6",
"uuid": "^9.0.1",
"whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#8fdf2b840ea320cd407af49c88ffdbd9c68f1bd1",
"whatsapp-web.js": "^1.26.0",
"yt_duration": "^0.0.2",
"yt_metadata": "^0.0.5",
"ytdlp_video_processor": "^0.0.6"
Expand Down
11 changes: 5 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 903d9bd

Please sign in to comment.