feat: vote_update event (#2596)
* Merge branch 'add-polls' into polls-ext * added listener to poll votes * added isUnvote property * added option for custom message secret * usage example updated * added logic for catching removed votes * usage example updated * fixed logic for poll vote events * temp usage example * No more `isCurrentState` * messageSecret converted to array Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com> * docs updated * we already have messageSecret in vote.parentMessage * PollVote.selectedOptions changed to be similar to pollOptions * docs fixed * window.injectToFunction clarifications * minor clarifications * fix: typo * style: fix broken link in readme file --------- Co-authored-by: tuyuribr <45042245+tuyuribr@users.noreply.github.com>
This commit is contained in:
parent
8c810a8462
commit
01714fe599
1 changed files with 132 additions and 3 deletions
|
|
@ -295,6 +295,7 @@ class Message extends Base {
|
|||
this.allowMultipleAnswers = Boolean(!data.pollSelectableOptionsCount);
|
||||
this.pollInvalidated = data.pollInvalidated;
|
||||
this.isSentCagPollCreation = data.isSentCagPollCreation;
|
||||
this.messageSecret = Object.keys(data.messageSecret).map((key) => data.messageSecret[key]);
|
||||
}
|
||||
|
||||
return super._patch(data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue