feat: mentions badge in chat list and muted-mention delivery
All checks were successful
CI / test (push) Successful in 21s
All checks were successful
CI / test (push) Successful in 21s
This commit is contained in:
@@ -44,8 +44,6 @@ async def dispatch_message_notifications(db: AsyncSession, message: Message) ->
|
||||
sender_name = sender_users[0].username if sender_users else "Someone"
|
||||
|
||||
for recipient in users:
|
||||
if await is_chat_muted_for_user(db, chat_id=message.chat_id, user_id=recipient.id):
|
||||
continue
|
||||
base_payload = {
|
||||
"chat_id": message.chat_id,
|
||||
"message_id": message.id,
|
||||
@@ -71,6 +69,9 @@ async def dispatch_message_notifications(db: AsyncSession, message: Message) ->
|
||||
)
|
||||
continue
|
||||
|
||||
if await is_chat_muted_for_user(db, chat_id=message.chat_id, user_id=recipient.id):
|
||||
continue
|
||||
|
||||
if not await is_user_online(recipient.id):
|
||||
payload = {
|
||||
**base_payload,
|
||||
|
||||
Reference in New Issue
Block a user