Browse Source

default visibility set to "unlisted"

Davide Alberani 5 years ago
parent
commit
dee46f821e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      toot-my-t-shirt

+ 3 - 1
toot-my-t-shirt

@@ -77,7 +77,8 @@ class Socialite:
     def mastodon_post_image(self, img, mime_type, message, description):
         mdict = self.mastodon.media_post(media_file=img, mime_type=mime_type, description=description)
         media_id = mdict['id']
-        self.mastodon.status_post(status=message, media_ids=[media_id])
+        self.mastodon.status_post(status=message, media_ids=[media_id],
+                                  visibility=self.options.mastodon_visibility)
 
     def store_image(self, img, mime_type, message, description):
         suffix = '.jpg'
@@ -201,6 +202,7 @@ def run():
 
     define("mastodon-token", help="Mastodon token", type=str)
     define("mastodon-api-url", help="Mastodon API URL", type=str)
+    define("mastodon-visibility", help="Mastodon toot visibility", default='unlisted')
 
     define("store-dir", help="store images in this directory", type=str)