diff --git a/mastodon.py b/mastodon.py index 6d30abc..1a9bcd6 100644 --- a/mastodon.py +++ b/mastodon.py @@ -1,6 +1,6 @@ import logging -from settings import MASTODON_INSTANCE, MASTODON_ACCESS_TOKEN +from settings import MASTODON_INSTANCE, MASTODON_ACCESS_TOKEN, MASTODON_VISIBILITY API_STATUSES = '/api/v1/statuses' API_STATUS_CONTEXT = '/api/v1/statuses/%(id)s/context' @@ -53,7 +53,7 @@ class Mastodon: API_STATUSES, data={ 'status': status, - 'visibility': 'direct', + 'visibility': MASTODON_VISIBILITY, 'in_reply_to_id': in_reply_to_id }) diff --git a/settings.py b/settings.py index c2a3e50..ad4460d 100644 --- a/settings.py +++ b/settings.py @@ -9,6 +9,7 @@ MASTODON_USERNAME = os.environ.get('MASTODON_USERNAME') MASTODON_INSTANCE = os.environ.get("MASTODON_INSTANCE") MASTODON_ACCESS_TOKEN = os.environ.get('MASTODON_ACCESS_TOKEN') +MASTODON_VISIBILITY = os.environ.get('MASTODON_VISIBILITY', 'direct') TELEGRAM_API_TOKEN = os.environ.get('TELEGRAM_API_TOKEN') TELEGRAM_CHAT_ID = int(os.environ.get('TELEGRAM_CHAT_ID'))