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

@ -44,6 +44,7 @@ from .crud import (
get_stalls,
get_zone,
get_zones,
update_customer_no_unread_messages,
update_merchant,
update_order_shipped_status,
update_product,
@ -738,6 +739,7 @@ async def api_get_messages(
assert merchant, f"Merchant cannot be found"
messages = await get_direct_messages(merchant.id, public_key)
await update_customer_no_unread_messages(public_key)
return messages
except AssertionError as ex:
raise HTTPException(