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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user