diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b3712dd..4c3f0d2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2,4 +2,5 @@ * [Matthew D. Scholefield](https://github.com/MatthewScholefield) - Added cors allowed origins for AsyncServer [#7](https://github.com/pyropy/fastapi-socketio/pull/7) * [Aaron Tolman](https://github.com/tolmanam) - Reported issue with broken pip download [#5](https://github.com/pyropy/fastapi-socketio/issues/5) -* [Khiem Doan](https://github.com/khiemdoan) - Helped with cleaning up old unused dependencies[#5](https://github.com/pyropy/fastapi-socketio/issues/15) \ No newline at end of file +* [Khiem Doan](https://github.com/khiemdoan) - Helped with cleaning up old unused dependencies[#5](https://github.com/pyropy/fastapi-socketio/issues/15) +* [Artem Kolomatskiy](https://github.com/Roxe322) - Fixed invalid usage of enter_room and leave_room[#24](https://github.com/pyropy/fastapi-socketio/issues/24) \ No newline at end of file diff --git a/fastapi_socketio/socket_manager.py b/fastapi_socketio/socket_manager.py index b12b54a..083c7f6 100644 --- a/fastapi_socketio/socket_manager.py +++ b/fastapi_socketio/socket_manager.py @@ -1,5 +1,6 @@ +from typing import Union + import socketio -from typing import Optional, Union from fastapi import FastAPI class SocketManager: @@ -89,10 +90,9 @@ def sleep(self): return self._sio.sleep @property - def enter_room(self, sid: str, room: str, namespace: Optional[str] = None): - return self._sio.enter_room(sid, room, namespace) + def enter_room(self): + return self._sio.enter_room @property - def leave_room(self, sid: str, room: str, namespace: Optional[str] = None): - return self._sio.leave_room(sid, room, namespace) - + def leave_room(self): + return self._sio.leave_room