Merge branch 'WhiskeySockets:master' into master

This commit is contained in:
Samuel Scheit
2023-05-17 16:55:24 +02:00
committed by GitHub

View File

@@ -748,7 +748,7 @@ export function getAggregateVotesInPollMessage(
{ message, pollUpdates }: Pick<WAMessage, 'pollUpdates' | 'message'>,
meId?: string
) {
const opts = message?.pollCreationMessage?.options || []
const opts = message?.pollCreationMessage?.options || message?.pollCreationMessageV2?.options || message?.pollCreationMessageV3?.options || []
const voteHashMap = opts.reduce((acc, opt) => {
const hash = sha256(Buffer.from(opt.optionName || '')).toString()
acc[hash] = {