Update server.py
This commit is contained in:
11
server.py
11
server.py
@@ -140,6 +140,17 @@ def handle_client(client_socket, addr):
|
||||
|
||||
client_socket.sendall(json.dumps(chats).encode("utf-8"))
|
||||
|
||||
elif action == "get_users":
|
||||
chat_name = request["chat"]
|
||||
|
||||
if chat_name in chats:
|
||||
users = chats[chat_name]["users"]
|
||||
|
||||
client_socket.sendall(json.dumps({
|
||||
"type": "users_list",
|
||||
"users": users
|
||||
}).encode("utf-8"))
|
||||
|
||||
elif action == "openchat":
|
||||
chat_name = request["chat_name"]
|
||||
if chat_name in chats:
|
||||
|
||||
Reference in New Issue
Block a user