From 2b60bd4132e28170550274c9e00ac68d27e45d1a Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Thu, 17 Jun 2021 13:31:31 +0200 Subject: [PATCH 1/3] Add enter and leave room functions --- fastapi_socketio/socket_manager.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fastapi_socketio/socket_manager.py b/fastapi_socketio/socket_manager.py index c5a57ab..142da69 100644 --- a/fastapi_socketio/socket_manager.py +++ b/fastapi_socketio/socket_manager.py @@ -1,5 +1,5 @@ import socketio -from typing import Union +from typing import Optional, Union from fastapi import FastAPI @@ -87,3 +87,12 @@ def start_background_task(self): @property 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) + + @property + def leave_room(self, sid: str, room: str, namespace: Optional[str] = None): + return self._sio.leave_room(sid, room, namespace) + From 221b10f466f3f4dbe73db69d5e38708f29334782 Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Thu, 17 Jun 2021 13:33:15 +0200 Subject: [PATCH 2/3] Update contributors --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 1b5fa9a..b3712dd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2,3 +2,4 @@ * [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 From d581ddf90843bc04681929836bfcf819df9ac4da Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Thu, 17 Jun 2021 13:33:48 +0200 Subject: [PATCH 3/3] Bump package version to 0.0.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bd1bbed..18efdd3 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup import os -VERSION = "0.0.6" +VERSION = "0.0.7" def get_long_description():