Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

Commit c20d100

Browse files
authored
Merge pull request #25 from Roxe322/master
Fixed #24 invalid enter_room and leave_room
2 parents 0a511cc + 3994b38 commit c20d100

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CONTRIBUTORS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
* [Matthew D. Scholefield](https://github.com/MatthewScholefield) - Added cors allowed origins for AsyncServer [#7](https://github.com/pyropy/fastapi-socketio/pull/7)
44
* [Aaron Tolman](https://github.com/tolmanam) - Reported issue with broken pip download [#5](https://github.com/pyropy/fastapi-socketio/issues/5)
5-
* [Khiem Doan](https://github.com/khiemdoan) - Helped with cleaning up old unused dependencies[#5](https://github.com/pyropy/fastapi-socketio/issues/15)
5+
* [Khiem Doan](https://github.com/khiemdoan) - Helped with cleaning up old unused dependencies[#5](https://github.com/pyropy/fastapi-socketio/issues/15)
6+
* [Artem Kolomatskiy](https://github.com/Roxe322) - Fixed invalid usage of enter_room and leave_room[#24](https://github.com/pyropy/fastapi-socketio/issues/24)

fastapi_socketio/socket_manager.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
from typing import Union
2+
13
import socketio
2-
from typing import Optional, Union
34
from fastapi import FastAPI
45

56
class SocketManager:
@@ -89,10 +90,9 @@ def sleep(self):
8990
return self._sio.sleep
9091

9192
@property
92-
def enter_room(self, sid: str, room: str, namespace: Optional[str] = None):
93-
return self._sio.enter_room(sid, room, namespace)
93+
def enter_room(self):
94+
return self._sio.enter_room
9495

9596
@property
96-
def leave_room(self, sid: str, room: str, namespace: Optional[str] = None):
97-
return self._sio.leave_room(sid, room, namespace)
98-
97+
def leave_room(self):
98+
return self._sio.leave_room

0 commit comments

Comments
 (0)