diff --git a/lnbits/extensions/copilot/config.json b/lnbits/extensions/copilot/config.json index fe1ee455b..8bb16367a 100644 --- a/lnbits/extensions/copilot/config.json +++ b/lnbits/extensions/copilot/config.json @@ -1,6 +1,6 @@ { "name": "StreamerCopilot", - "short_description": "Tipping and animations for streamers", + "short_description": "Tipping, animations and webhooks for streamers", "icon": "face", "contributors": [ "arcbtc" diff --git a/lnbits/extensions/copilot/models.py b/lnbits/extensions/copilot/models.py index aab7c4793..46f75a808 100644 --- a/lnbits/extensions/copilot/models.py +++ b/lnbits/extensions/copilot/models.py @@ -30,7 +30,6 @@ class Copilots(NamedTuple): timestamp: int fullscreen_cam: int iframe_url: str - notes: str @classmethod def from_row(cls, row: Row) -> "Copilots": diff --git a/lnbits/extensions/copilot/tasks.py b/lnbits/extensions/copilot/tasks.py index 29ec62dc6..0dfb89869 100644 --- a/lnbits/extensions/copilot/tasks.py +++ b/lnbits/extensions/copilot/tasks.py @@ -10,6 +10,7 @@ from .crud import get_copilot from .views import updater import shortuuid + async def register_listeners(): invoice_paid_chan_send, invoice_paid_chan_recv = trio.open_memory_channel(2) register_invoice_listener(invoice_paid_chan_send) @@ -25,7 +26,7 @@ async def on_invoice_paid(payment: Payment) -> None: webhook = None data = None if "copilot" != payment.extra.get("tag"): - # not an lnurlp invoice + # not an copilot invoice return if payment.extra.get("wh_status"): @@ -39,7 +40,10 @@ async def on_invoice_paid(payment: Payment) -> None: jsonify({"message": "Copilot link link does not exist."}), HTTPStatus.NOT_FOUND, ) - if int(copilot.animation1threshold) and int(payment.amount) > copilot.animation1threshold: + if ( + int(copilot.animation1threshold) + and int(payment.amount) > copilot.animation1threshold + ): data = copilot.animation1 webhook = copilot.animation1webhook if ( diff --git a/lnbits/extensions/copilot/templates/copilot/compose.html b/lnbits/extensions/copilot/templates/copilot/compose.html index 6f5195a4e..182774b42 100644 --- a/lnbits/extensions/copilot/templates/copilot/compose.html +++ b/lnbits/extensions/copilot/templates/copilot/compose.html @@ -172,7 +172,7 @@ } this.connection.addEventListener('open', function (event) { - this.connection.send('') + this.connection.send('handshake') }) var showNotif = this.showNotif diff --git a/lnbits/extensions/copilot/templates/copilot/panel.html b/lnbits/extensions/copilot/templates/copilot/panel.html index 2554d3cdd..a0d43bdfe 100644 --- a/lnbits/extensions/copilot/templates/copilot/panel.html +++ b/lnbits/extensions/copilot/templates/copilot/panel.html @@ -103,25 +103,6 @@ /> -