Fix using deleteChannel on private channels

This commit is contained in:
abalabahaha
2016-07-28 04:36:04 +09:00
parent babf550459
commit dc939c48ee
3 changed files with 20 additions and 12 deletions

View File

@@ -227,7 +227,7 @@ var Server = (function (_Equality) {
channel.members.add(user);
user.voiceChannel = channel;
if (oldChannel.id) {
if (oldChannel.id && channel.id !== oldChannel.id) {
this.client.emit("voiceLeave", oldChannel, user);
this.client.emit("voiceSwitch", oldChannel, channel, user);
}