Check for correct usable data in client registration
All checks were successful
Check / mypy (push) Successful in 2m18s
Check / ruff (push) Successful in 8s

This commit is contained in:
Christoph Stahl 2025-08-18 22:58:34 +02:00
parent 93cf92e0cf
commit 8107791dab

View file

@ -1447,7 +1447,7 @@ class Server:
:return: True, if the room exist, False otherwise :return: True, if the room exist, False otherwise
:rtype: bool :rtype: bool
""" """
if data["room"] in self.clients: if "room" in data and data["room"] in self.clients:
async with self.sio.session(sid) as session: async with self.sio.session(sid) as session:
session["room"] = data["room"] session["room"] = data["room"]
await self.sio.enter_room(sid, session["room"]) await self.sio.enter_room(sid, session["room"])