From a65f9a95656344e459650ce637bee294cc36b53a Mon Sep 17 00:00:00 2001 From: Luna Date: Fri, 25 Jun 2021 16:22:43 -0300 Subject: [PATCH] gateway: allow more gateway versions --- litecord/gateway/gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litecord/gateway/gateway.py b/litecord/gateway/gateway.py index 5d36922..e9c4a03 100644 --- a/litecord/gateway/gateway.py +++ b/litecord/gateway/gateway.py @@ -38,11 +38,11 @@ async def websocket_handler(app, ws, url): except (KeyError, IndexError): gw_encoding = "json" - if gw_version not in ("6", "7"): - return await ws.close(1000, "Invalid gateway version") + if gw_version not in ("6", "7", "8", "9"): + return await ws.close(4000, f"Invalid gateway version (got {gw_version})") if gw_encoding not in ("json", "etf"): - return await ws.close(1000, "Invalid gateway encoding") + return await ws.close(4000, f"Invalid gateway encoding (got {gw_encoding})") try: gw_compress: Optional[str] = args["compress"][0]