diff options
author | AlTech98 <altech123159@gmail.com> | 2021-09-03 14:23:33 +0200 |
---|---|---|
committer | AlTech98 <altech123159@gmail.com> | 2021-09-03 14:23:33 +0200 |
commit | c8345b3223bb3825c151bd811a5b6460b1bfbc38 (patch) | |
tree | 620e040d98a542ccccf33d9c0d3b063439ab0fac /gateway | |
parent | Make the user leave the current channel before joining one in another guild (diff) | |
download | server-c8345b3223bb3825c151bd811a5b6460b1bfbc38.tar.xz |
Fix to send the voice leave event only to the right session
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/src/opcodes/VoiceStateUpdate.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gateway/src/opcodes/VoiceStateUpdate.ts b/gateway/src/opcodes/VoiceStateUpdate.ts index 668508fd..fba0db1f 100644 --- a/gateway/src/opcodes/VoiceStateUpdate.ts +++ b/gateway/src/opcodes/VoiceStateUpdate.ts @@ -23,7 +23,7 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) { } //If a user change voice channel between guild we should send a left event first - if (voiceState.guild_id !== body.guild_id) { + if (voiceState.guild_id !== body.guild_id && voiceState.session_id === this.session_id) { await emitEvent({ event: "VOICE_STATE_UPDATE", data: { ...voiceState, channel_id: null }, |