Skip to content

Commit 09b4ee2

Browse files
committed
enable YRoomWebsocket handler
1 parent db4d698 commit 09b4ee2

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
@@ -20,7 +20,7 @@ class RtcExtensionApp(ExtensionApp):
2020
# global awareness websocket
2121
# (r"api/collaboration/room/JupyterLab:globalAwareness/?", GlobalAwarenessWebsocket),
2222
# # ydoc websocket
23-
# (r"api/collaboration/room/(.*)", YRoomWebsocket)
23+
(r"api/collaboration/room/(.*)", YRoomWebsocket)
2424
]
2525

2626
yroom_manager_class = Type(

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)