fix: livestream producer sharing was conflicting with internal payments.

This commit is contained in:
fiatjaf 2021-04-08 20:23:21 -03:00
parent 2a198d3186
commit da9723735c

View File

@ -52,9 +52,16 @@ async def on_invoice_paid(payment: Payment) -> None:
UPDATE apipayments
SET extra = ?, amount = ?
WHERE hash = ?
AND checking_id NOT LIKE 'internal_%'
""",
(
json.dumps(dict(**payment.extra, shared_with=[producer.name, producer.id], received=payment.amount,)),
json.dumps(
dict(
**payment.extra,
shared_with=[producer.name, producer.id],
received=payment.amount,
)
),
payment.amount - amount,
payment.payment_hash,
),