Compare commits

...

2 Commits

Author SHA1 Message Date
Luna e85e38ddb7 add TODO note for voice key optimization 2022-02-19 17:47:55 -03:00
Luna 3d127b405f ignore possibly invalid VSUs but still warn on them 2022-02-19 17:45:09 -03:00
1 changed files with 7 additions and 0 deletions

View File

@ -887,6 +887,9 @@ class GatewayWebsocket:
# they CAN NOT enter two channels in a single guild.
# this state id format takes care of that.
#
# TODO voice_key should have a type as a 0th element to prevent
# code from having to call get_guild(id2).
voice_key = (self.state.user_id, state_id2)
voice_state = await self.app.voice.get_state(voice_key)
@ -904,6 +907,10 @@ class GatewayWebsocket:
if same_guild and not same_channel:
return await self.app.voice.move_state(voice_state, channel_id)
# TODO: this is an edge case. we're trying to move guilds in
# a single message, perhaps?
log.warning("vsu payload does not appear logical")
async def _handle_5(self, payload: Dict[str, Any]):
"""Handle OP 5 Voice Server Ping.