mirror of https://github.com/calzoneman/sync.git
fix poll unvoting
This commit is contained in:
parent
baa8af58bc
commit
d004c0bcdd
|
@ -65,6 +65,13 @@ PollModule.prototype.onUserPostJoin = function (user) {
|
|||
user.socket.on("closePoll", this.handleClosePoll.bind(this, user));
|
||||
};
|
||||
|
||||
PollModule.prototype.onUserPart = function(user) {
|
||||
if (this.poll) {
|
||||
this.poll.unvote(user.ip);
|
||||
this.sendPollUpdate(this.channel.users);
|
||||
}
|
||||
};
|
||||
|
||||
PollModule.prototype.sendPoll = function (users) {
|
||||
if (!this.poll) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue