From 8b8085bc3f1f6c08f13d65702a98692a6dbd1995 Mon Sep 17 00:00:00 2001 From: Anon Date: Wed, 17 Jul 2024 20:33:10 -0700 Subject: [PATCH] Removed redundant function and added it as a callback. --- fedistatusposter.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fedistatusposter.py b/fedistatusposter.py index 1a1de53..3fa6171 100755 --- a/fedistatusposter.py +++ b/fedistatusposter.py @@ -29,8 +29,8 @@ class FediStatusPoster: self.mastodon_api = self.login(client_id, client_secret, access_token, api_base_url, feature_set) # Callback functions - self.status_post = self._status_post_debug if debug_mode else self._status_post self.media_post = self._media_post_debug if debug_mode else self.mastodon_api.media_post + self.status_post = self._status_post_debug if debug_mode else self.mastodon_api.status_post def login(self, client_id, client_secret, access_token, api_base_url, feature_set): try: @@ -95,15 +95,6 @@ class FediStatusPoster: print("CONTENT_TYPE:", content_type) print("[DEBUG_END]") - def _status_post(self, status, media_ids, sensitive, visibility, content_type): - self.mastodon_api.status_post( - status=status, - media_ids=media_ids, - visibility=visibility, - sensitive=sensitive, - content_type=content_type - ) - # If the user wants to generate html links to the image file, # switch the content type to markdown. I think this is sane # default behavior, since the alternative would be generating