From b55972653560c49be09067df5d9e2da0a0790e52 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 30 Nov 2022 11:19:51 -0600 Subject: [PATCH] Update method to determine custom character limit to detect changes in mastodon servers --- src/sessions/mastodon/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sessions/mastodon/session.py b/src/sessions/mastodon/session.py index df8266e0..2d8c714f 100644 --- a/src/sessions/mastodon/session.py +++ b/src/sessions/mastodon/session.py @@ -105,8 +105,8 @@ class Session(base.baseSession): self.get_muted_users() # determine instance custom characters limit. instance = self.api.instance() - if hasattr(instance, "max_toot_chars"): - self.char_limit = instance.max_toot_chars + if hasattr(instance, "configuration") and hasattr(instance.configuration, "statuses") and hasattr(instance.configuration.statuses, "max_characters"): + self.char_limit = instance.configuration.statuses.max_characters self.settings.write() def get_lists(self):