messages broken
This commit is contained in:
parent
93c1cf4867
commit
2803f83ffb
3 changed files with 2 additions and 4 deletions
|
|
@ -183,7 +183,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connection.addEventListener('open', function (event) {
|
this.connection.addEventListener('open', function (event) {
|
||||||
this.connection.send('handshake')
|
this.connection.send('')
|
||||||
})
|
})
|
||||||
var showNotif = this.showNotif
|
var showNotif = this.showNotif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,6 @@ async def ws_panel(copilot_id):
|
||||||
global socket_relay
|
global socket_relay
|
||||||
while True:
|
while True:
|
||||||
data = await websocket.receive()
|
data = await websocket.receive()
|
||||||
if data == "handshake":
|
|
||||||
await websocket.send(f"willkommen")
|
|
||||||
socket_relay[copilot_id] = shortuuid.uuid()[:5] + "-" + data + "-" + "none"
|
socket_relay[copilot_id] = shortuuid.uuid()[:5] + "-" + data + "-" + "none"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,6 @@ async def api_copilot_ws_relay(copilot_id, comment, data):
|
||||||
if not copilot:
|
if not copilot:
|
||||||
return jsonify({"message": "copilot does not exist"}), HTTPStatus.NOT_FOUND
|
return jsonify({"message": "copilot does not exist"}), HTTPStatus.NOT_FOUND
|
||||||
await updater(data, comment, copilot_id)
|
await updater(data, comment, copilot_id)
|
||||||
print("updated")
|
print(comment)
|
||||||
return "", HTTPStatus.OK
|
return "", HTTPStatus.OK
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue