Advanced chat management via UI

This commit is contained in:
Shivering Ocelot committed 2025-05-22 07:48:36 -05:00
1 parent fbee31841d
commit 5351144edf
9 files changed
+396 -59

No files matched your search

+8 -1
View File
@@ -91,7 +91,8 @@ def start_server(app):
user_id=user_id,
name=body['name'],
description=body.get('description'),
picture=body.get('picture')
picture=body.get('picture'),
members=body.get('members', []),
)
await send({'message': "chat created", 'chatId': chat_id, 'nonce': nonce})
@@ -99,6 +100,12 @@ def start_server(app):
chats_data = app.get_chats(user_id)
await send({'message': "chats retrieved", 'chats': chats_data, 'nonce': nonce})
elif action == "delete-chat":
chat_id = app.delete_chat(
chat_id=body['chatId']
)
await send({'message': "chat deleted", 'chatId': chat_id, 'nonce': nonce})
elif action == "get-chat-messages":
messages_data = app.get_chat_messages(
body['chatId'],