From 8c88be12c55d20c3c4412ec843bd4a43a8d3fa5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Thu, 2 Jan 2025 18:35:50 +0100 Subject: [PATCH] fix: tasks use payment_hash --- tasks.py | 4 +--- templates/pay2print/photo.html | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks.py b/tasks.py index a1756bc..d6c1504 100644 --- a/tasks.py +++ b/tasks.py @@ -20,9 +20,7 @@ async def wait_for_paid_invoices(): async def on_invoice_paid(payment: Payment) -> None: if payment.extra.get("tag") == "pay2print": logger.info("pay2print extension received payment") - print_id = payment.extra.get("print_id") - assert print_id, "Print ID not found." - _print = await get_print(print_id) + _print = await get_print(payment.payment_hash) assert _print, "Print not found." printer = await get_printer(_print.printer) assert printer, "Printer not found." diff --git a/templates/pay2print/photo.html b/templates/pay2print/photo.html index d5021b9..296563e 100644 --- a/templates/pay2print/photo.html +++ b/templates/pay2print/photo.html @@ -42,7 +42,8 @@

autoplay style="display: none" > -

+

Device does not support camera!

+