fix: notification for orders
This commit is contained in:
parent
21a77d643f
commit
2b84ebc83b
5 changed files with 54 additions and 38 deletions
|
|
@ -5,6 +5,7 @@ from typing import List, Optional
|
|||
from fastapi import Depends
|
||||
from fastapi.exceptions import HTTPException
|
||||
from loguru import logger
|
||||
from lnbits.core.services import websocketUpdater
|
||||
|
||||
from lnbits.decorators import (
|
||||
WalletTypeInfo,
|
||||
|
|
@ -799,6 +800,10 @@ async def api_update_order_status(
|
|||
await create_direct_message(merchant.id, dm)
|
||||
|
||||
await nostr_client.publish_nostr_event(dm_event)
|
||||
await websocketUpdater(
|
||||
merchant.id,
|
||||
json.dumps({ "type": f"dm:{dm.type}", "customerPubkey": order.public_key, "dm": dm.dict() }),
|
||||
)
|
||||
|
||||
return order
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue