summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-03 14:23:33 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-03 14:23:33 +0200
commit48036bdad577740c3b3ccf839870b7c190a1618a (patch)
tree6243f89c83f5706c3e2210540433f8a1564e9009
parentMake the user leave the current channel before joining one in another guild (diff)
downloadserver-48036bdad577740c3b3ccf839870b7c190a1618a.tar.xz
Fix to send the voice leave event only to the right session
-rw-r--r--gateway/src/opcodes/VoiceStateUpdate.ts2
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 },