gateway: don't check all the payloads

This commit is contained in:
Luna 2021-09-05 00:51:52 -03:00
parent bcb626c024
commit 1fcce1ed0c
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ class GatewayState:
if self.ws:
if (
event_type.startswith("MESSAGE_")
and payload["d"]["message_reference"] is not None
and (payload.get("d") or {}).get("message_reference") is not None
and self.ws.ws_properties.version > 7
):
payload["d"]["type"] = 19