Skip to content

Commit 4f40a42

Browse files
committed
enable YRoomWebsocket handler
1 parent fcaa497 commit 4f40a42

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

jupyter_rtc_core/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RtcExtensionApp(ExtensionApp):
1818
# global awareness websocket
1919
# (r"api/collaboration/room/JupyterLab:globalAwareness/?", GlobalAwarenessWebsocket),
2020
# # ydoc websocket
21-
# (r"api/collaboration/room/(.*)", YRoomWebsocket)
21+
(r"api/collaboration/room/(.*)", YRoomWebsocket)
2222
]
2323

2424
def initialize(self):

jupyter_rtc_core/websockets/yroom_ws.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ def prepare(self):
2727
request_path: str = self.request.path
2828
self.room_id = request_path.strip("/").split("/")[-1]
2929

30+
# TODO: remove this once globalawareness is implemented
31+
if self.room_id == "JupyterLab:globalAwareness":
32+
raise HTTPError(404)
33+
3034
# Verify the file ID contained in the room ID points to a valid file.
3135
fileid = self.room_id.split(":")[-1]
3236
path = self.fileid_manager.get_path(fileid)

0 commit comments

Comments
 (0)