Skip to content

Commit 2d35fda

Browse files
author
Jialin Zhang
committed
addressing a comment
1 parent c6c9393 commit 2d35fda

File tree

4 files changed

+6
-57
lines changed

4 files changed

+6
-57
lines changed

jupyter_rtc_core/app.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from traitlets import Instance, Type
66
from .handlers import RouteHandler, FileIDIndexHandler
7-
from .websockets import GlobalAwarenessWebsocket, YRoomWebsocket
7+
from .websockets import YRoomWebsocket
88
from .rooms.yroom_manager import YRoomManager
99
from .outputs import OutputsManager, outputs_handlers
1010

@@ -17,8 +17,6 @@ class RtcExtensionApp(ExtensionApp):
1717
# dummy handler that verifies the server extension is installed;
1818
# # this can be deleted prior to initial release.
1919
(r"jupyter-rtc-core/get-example/?", RouteHandler),
20-
# global awareness websocket
21-
(r"api/collaboration/room/JupyterLab:globalAwareness/?", GlobalAwarenessWebsocket),
2220
# # ydoc websocket
2321
(r"api/collaboration/room/(.*)", YRoomWebsocket),
2422
# # handler that just adds compatibility with Jupyter Collaboration's frontend
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
from .clients import YjsClient, YjsClientGroup
22
from .yroom_ws import YRoomWebsocket
3-
from .global_awareness_ws import GlobalAwarenessWebsocket

jupyter_rtc_core/websockets/global_awareness_ws.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

jupyter_rtc_core/websockets/yroom_ws.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ def prepare(self):
4141
self.room_id = request_path.strip("/").split("/")[-1]
4242

4343
# Verify the file ID contained in the room ID points to a valid file.
44-
fileid = self.room_id.split(":")[-1]
45-
path = self.fileid_manager.get_path(fileid)
46-
if not path:
47-
raise HTTPError(404, f"No file with ID '{fileid}'.")
44+
if self.room_id != "JupyterLab:globalAwareness":
45+
fileid = self.room_id.split(":")[-1]
46+
path = self.fileid_manager.get_path(fileid)
47+
if not path:
48+
raise HTTPError(404, f"No file with ID '{fileid}'.")
4849

4950

5051
def open(self, *_, **__):

0 commit comments

Comments
 (0)