SSE endpoint for paid invoices.

also move very essential stuff from core/tasks.py to tasks.py so things
are more organized.
This commit is contained in:
fiatjaf
2020-10-06 00:40:18 -03:00
parent 4e68a0e7e6
commit 95e8573ff8
9 changed files with 167 additions and 93 deletions
+1 -1
View File
@@ -9,6 +9,6 @@ from .views import * # noqa
from .lnurl import * # noqa
from .tasks import on_invoice_paid
from lnbits.core.tasks import register_invoice_listener
from lnbits.tasks import register_invoice_listener
register_invoice_listener("lnurlp", on_invoice_paid)
-1
View File
@@ -6,7 +6,6 @@ from .crud import get_pay_link_by_invoice, mark_webhook_sent
async def on_invoice_paid(payment: Payment) -> None:
print(payment)
islnurlp = "lnurlp" == payment.extra.get("tag")
if islnurlp:
pay_link = get_pay_link_by_invoice(payment.payment_hash)