feat: keep track of new messages

This commit is contained in:
Vlad Stan 2023-03-29 14:20:49 +03:00
parent 098cb5adf5
commit e04b9dc448
7 changed files with 32 additions and 1 deletions

View file

@ -20,6 +20,7 @@ from .crud import (
get_products_by_ids,
get_stalls,
get_wallet_for_product,
increment_customer_unread_messages,
update_customer_profile,
update_order_paid_status,
update_product,
@ -256,6 +257,8 @@ async def _handle_incoming_dms(
customer = await get_customer(merchant.id, event.pubkey)
if not customer:
await _handle_new_customer(event, merchant)
else:
await increment_customer_unread_messages(event.pubkey)
dm_reply = await _handle_dirrect_message(
merchant.id,