Update method to determine custom character limit to detect changes in mastodon servers

This commit is contained in:
Manuel Cortez 2022-11-30 11:19:51 -06:00
parent 768f0bc396
commit b559726535
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790

View File

@ -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):