mirror of
https://github.com/spacebarchat/server.git
synced 2026-11-04 09:07:50 +00:00
VoiceStateUpdate: coalesce empty channel/guild ids to undefined
This commit is contained in:
1 parent
cb301f0371
commit
91bfce71ee
1 file changed
+4
@@ -45,6 +45,10 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) {
|
||||
}
|
||||
|
||||
const body = data.d as VoiceStateUpdateSchema;
|
||||
// TODO: should this be null?
|
||||
if (body.channel_id == "") body.channel_id = undefined;
|
||||
if (body.guild_id == "") body.guild_id = undefined;
|
||||
|
||||
const isNew = body.channel_id === null && body.guild_id === null;
|
||||
let isChanged = false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user