diff --git a/config.json b/config.json index cb97e45..4288974 100644 --- a/config.json +++ b/config.json @@ -3,6 +3,6 @@ "short_description": "Video tips/animations/webhooks", "tile": "/copilot/static/bitcoin-streaming.png", "contributors": ["arcbtc"], - "min_lnbits_version": "0.11.0", + "min_lnbits_version": "0.12.6", "is_installed": true } diff --git a/tasks.py b/tasks.py index b0d3ac5..6854184 100644 --- a/tasks.py +++ b/tasks.py @@ -7,7 +7,7 @@ from lnbits.core import db as core_db from lnbits.core.models import Payment -from lnbits.core.services import websocketUpdater +from lnbits.core.services import websocket_updater from lnbits.helpers import get_current_extension_name from lnbits.tasks import register_invoice_listener @@ -65,11 +65,11 @@ async def on_invoice_paid(payment: Payment) -> None: except (httpx.ConnectError, httpx.RequestError): await mark_webhook_sent(payment, -1) if payment.extra.get("comment"): - await websocketUpdater( + await websocket_updater( copilot.id, str(data) + "-" + str(payment.extra.get("comment")) ) - await websocketUpdater(copilot.id, str(data) + "-none") + await websocket_updater(copilot.id, str(data) + "-none") async def mark_webhook_sent(payment: Payment, status: int) -> None: diff --git a/views_api.py b/views_api.py index 3755db4..2910062 100644 --- a/views_api.py +++ b/views_api.py @@ -3,7 +3,7 @@ from fastapi import Depends, Request from fastapi.exceptions import HTTPException -from lnbits.core.services import websocketUpdater +from lnbits.core.services import websocket_updater from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key from . import copilot_ext @@ -97,7 +97,7 @@ async def api_copilot_ws_relay(copilot_id: str, comment: str, data: str): status_code=HTTPStatus.NOT_FOUND, detail="Copilot does not exist" ) try: - await websocketUpdater(copilot_id, str(data) + "-" + str(comment)) + await websocket_updater(copilot_id, str(data) + "-" + str(comment)) except: raise HTTPException(status_code=HTTPStatus.FORBIDDEN, detail="Not your copilot") return ""