From 85f7aa37bc13eea6db12f3408a3f4547d750daac Mon Sep 17 00:00:00 2001 From: DevilXD Date: Mon, 22 Aug 2022 10:00:18 +0200 Subject: [PATCH] Ensure check_login in all places the access token is used --- twitch.py | 1 + websocket.py | 1 + 2 files changed, 2 insertions(+) diff --git a/twitch.py b/twitch.py index b6dc6fc..123e7ce 100644 --- a/twitch.py +++ b/twitch.py @@ -884,6 +884,7 @@ class Twitch: async def gql_request(self, op: GQLOperation) -> JsonType: gql_logger.debug(f"GQL Request: {op}") + await self.check_login() async with self.request( "POST", "https://gql.twitch.tv/gql", diff --git a/websocket.py b/websocket.py index ede0059..d72ee46 100644 --- a/websocket.py +++ b/websocket.py @@ -200,6 +200,7 @@ class Websocket: # nothing to do return self._topics_changed.clear() + await self._twitch.check_login() current: set[WebsocketTopic] = set(self.topics.values()) # handle removed topics removed = self._submitted.difference(current)