diff --git a/chat.py b/chat.py index bcc1c334194fed1fcddb95379b279d1b425361cb..277647d6fa6249dd83c0fe22f30cbcfa64c6c0da 100644 --- a/chat.py +++ b/chat.py @@ -44,9 +44,9 @@ async def echo(websocket): #根据api-token查找房间号 room_id = name[websocket]['room_id'] #历史记录数量 - if "shownum" in event["type"]: + if "show_num" in event["type"]: r = { - "type": "shownum", + "type": "show_num", "content": "{}" } if room_id in history : diff --git a/websockets/chat.py b/websockets/chat.py index 956732ce06e07cf38e51d44864e80fb2ab6fb717..b1549626c136ec56a609b2ac723aa17ae472299f 100644 --- a/websockets/chat.py +++ b/websockets/chat.py @@ -43,9 +43,9 @@ async def echo(websocket): #根据api-token查找房间号 room_id = name[websocket]['room_id'] #历史记录数量 - if "shownum" in event["type"]: + if "show_num" in event["type"]: r = { - "type": "shownum", + "type": "show_num", "content": "{}" } if room_id in history :