realtime: emit and handle chat_deleted for full chat removals
All checks were successful
CI / test (push) Successful in 38s
All checks were successful
CI / test (push) Successful in 38s
This commit is contained in:
@@ -263,7 +263,9 @@ async def delete_chat(
|
||||
await delete_chat_for_user(db, chat_id=chat_id, user_id=current_user.id, payload=ChatDeleteRequest(for_all=for_all))
|
||||
if chat_before_delete and not chat_before_delete.is_saved:
|
||||
realtime_gateway.remove_chat_subscription(chat_id=chat_id, user_id=current_user.id)
|
||||
if not delete_for_all:
|
||||
if delete_for_all:
|
||||
await realtime_gateway.publish_chat_deleted(chat_id=chat_id)
|
||||
else:
|
||||
await realtime_gateway.publish_chat_updated(chat_id=chat_id)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user