From dfabae2f54950f5d34a1cf2c4747fdd565c178a5 Mon Sep 17 00:00:00 2001 From: halcy Date: Tue, 15 Nov 2022 10:46:23 +0200 Subject: small health fix --- CHANGELOG.rst | 1 + mastodon/Mastodon.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 87de0a2..c266cbc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,6 +23,7 @@ v1.6.0 * Added a method to revoke oauth tokens (thanks fluffy-critter) * Fixes * Various small and big fixes, improving reliablity and test coverage + * Changed health APIs to work with newer Mastodon versions * Changed URLs from "tootsuite" to "mastodon" in several places (thanks andypiper) * Fixed some fields not converting to datetimes (thanks SouthFox-D) * Improved oauth web flow support diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 11cd2f3..7de4be9 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -3341,9 +3341,8 @@ class Mastodon: """ Returns without True if streaming API is okay, False or raises an error otherwise. """ - api_okay = self.__api_request( - 'GET', '/api/v1/streaming/health', base_url_override=self.__get_streaming_base(), parse=False) - if api_okay == b'OK': + api_okay = self.__api_request('GET', '/api/v1/streaming/health', base_url_override=self.__get_streaming_base(), parse=False) + if api_okay in [b'OK', b'success']: return True return False -- cgit v1.2.3