Updated server/server.py

This commit is contained in:
mirai 2022-12-02 08:21:00 +03:00
parent 7aae7ae562
commit 4f7ec2267c

View File

@ -32,7 +32,7 @@ async def talking(request: Request, ws: Websocket) -> HTTPResponse:
async def talking(request: Request, ws: Websocket) -> HTTPResponse:
while True:
string = str({"status": [i.message for i in actual_messages], "users_in_chat": list(users.keys())})
await ws.send(b'')
await ws.send(string.encode())
await asyncio.sleep(0.2)
# return response.json({
# "status": [i.message for i in actual_messages],