Mastodon - visibility from env

This commit is contained in:
Johnny Gear 2025-11-13 22:03:20 -06:00
parent 596d5df0b0
commit b2788d0289
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,6 @@
import logging 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_STATUSES = '/api/v1/statuses'
API_STATUS_CONTEXT = '/api/v1/statuses/%(id)s/context' API_STATUS_CONTEXT = '/api/v1/statuses/%(id)s/context'
@ -53,7 +53,7 @@ class Mastodon:
API_STATUSES, API_STATUSES,
data={ data={
'status': status, 'status': status,
'visibility': 'direct', 'visibility': MASTODON_VISIBILITY,
'in_reply_to_id': in_reply_to_id 'in_reply_to_id': in_reply_to_id
}) })

View file

@ -9,6 +9,7 @@ MASTODON_USERNAME = os.environ.get('MASTODON_USERNAME')
MASTODON_INSTANCE = os.environ.get("MASTODON_INSTANCE") MASTODON_INSTANCE = os.environ.get("MASTODON_INSTANCE")
MASTODON_ACCESS_TOKEN = os.environ.get('MASTODON_ACCESS_TOKEN') 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_API_TOKEN = os.environ.get('TELEGRAM_API_TOKEN')
TELEGRAM_CHAT_ID = int(os.environ.get('TELEGRAM_CHAT_ID')) TELEGRAM_CHAT_ID = int(os.environ.get('TELEGRAM_CHAT_ID'))