Skip to content

Commit

Permalink
fix: Fixed error on get poll votes (close wppconnect-team#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Aug 27, 2023
1 parent 67089d7 commit 2afa64b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chat/functions/getVotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export async function getVotes(id: string | MsgKey): Promise<{
const msgKey = MsgKey.fromString(id.toString());
const msg = await getMessageById(msgKey);

if (!msg.asPollCreation) {
if (msg.type != 'poll_creation') {
throw new WPPError(
'msg_not_found',
`Message ${msgKey.toString()} not not a poll`,
`Message ${msgKey.toString()} not a poll`,
{
id: msgKey.toString(),
}
Expand Down

0 comments on commit 2afa64b

Please sign in to comment.