Skip to content

Commit 89ca178

Browse files
committed
Added workaround for exclude self not working properly in group meetings
1 parent 697ebdc commit 89ca178

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Games/core/Meeting.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ module.exports = class Meeting {
692692

693693
this.finished = true;
694694

695+
var isExcludeSelf = this.targetsDescription && this.targetsDescription["exclude"] && this.targetsDescription["exclude"].includes("self");
695696
var count = {};
696697
var highest = { targets: [], votes: 1 };
697698
var finalTarget;
@@ -704,6 +705,9 @@ module.exports = class Meeting {
704705

705706
if (!target) continue;
706707

708+
// Workaround for being unable to properly exclude self from group meetings
709+
if (isExcludeSelf && voterId === target) continue;
710+
707711
if (!count[target]) count[target] = 0;
708712

709713
count[target] += member.voteWeight;

0 commit comments

Comments
 (0)