mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-23 14:45:24 +00:00
Fix to send the voice leave event only to the right session
This commit is contained in:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user