diff --git a/lnbits/extensions/copilot/templates/copilot/compose.html b/lnbits/extensions/copilot/templates/copilot/compose.html index 44664b1a2..87979bdae 100644 --- a/lnbits/extensions/copilot/templates/copilot/compose.html +++ b/lnbits/extensions/copilot/templates/copilot/compose.html @@ -239,8 +239,7 @@ ':' + location.port + '/copilot/ws/' + - self.copilot.id + - '/' + self.copilot.id } else { localUrl = 'ws://' + @@ -248,8 +247,7 @@ ':' + location.port + '/copilot/ws/' + - self.copilot.id + - '/' + self.copilot.id } this.connection = new WebSocket(localUrl) this.connection.onmessage = function (e) { diff --git a/lnbits/extensions/copilot/views.py b/lnbits/extensions/copilot/views.py index 516bf4e38..544ecc49c 100644 --- a/lnbits/extensions/copilot/views.py +++ b/lnbits/extensions/copilot/views.py @@ -1,4 +1,5 @@ from http import HTTPStatus +from typing import List import httpx from collections import defaultdict from lnbits.decorators import check_user_exists @@ -70,7 +71,7 @@ class ConnectionManager: manager = ConnectionManager() -@copilot_ext.websocket("/ws/{socket_id}") +@copilot_ext.websocket("/copilot/ws/{socket_id}", name="copilot.websocket_by_id") async def websocket_endpoint(websocket: WebSocket, socket_id: str): await manager.connect(websocket) try: