Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -279,6 +279,15 @@ async def exe(websocket,connected):
|
|
279 |
elif event["command"]["type"]=="rename":
|
280 |
|
281 |
await rename_item(websocket, event["project_name"], event["path"], event["name"], connected)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
|
283 |
else:
|
284 |
# First player starts a new game.
|
|
|
279 |
elif event["command"]["type"]=="rename":
|
280 |
|
281 |
await rename_item(websocket, event["project_name"], event["path"], event["name"], connected)
|
282 |
+
elif event["command"]["type"]=="collabration":
|
283 |
+
|
284 |
+
event = {
|
285 |
+
"type": "collabration",
|
286 |
+
'name': event["name"],
|
287 |
+
'cursorPos': event["cursorPos"],
|
288 |
+
'content': event["content"],
|
289 |
+
}
|
290 |
+
websockets.broadcast(connected, json.dumps(event))
|
291 |
|
292 |
else:
|
293 |
# First player starts a new game.
|