Don't send a poll response event if you are voting for your current c… (#7326)
This commit is contained in:
parent
a727961c43
commit
5554d7fdc1
2 changed files with 27 additions and 2 deletions
|
@ -223,10 +223,13 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
|
|||
};
|
||||
|
||||
private selectOption(answerId: string) {
|
||||
if (answerId === this.state.selected) {
|
||||
if (this.isEnded()) {
|
||||
return;
|
||||
}
|
||||
if (this.isEnded()) {
|
||||
const userVotes = this.collectUserVotes();
|
||||
const userId = this.context.getUserId();
|
||||
const myVote = userVotes.get(userId)?.answers[0];
|
||||
if (answerId === myVote) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue