Browse Source

change visibility of non-main-toots to unlisted

(happens if post is to long)
master
hfte 2 years ago
parent
commit
5809f885d5
  1. 4
      mastaface.py

4
mastaface.py

@ -74,6 +74,8 @@ if post['time'] != database[config['facebook_page']]['last_edited']:
"-H", 'DNT: 1',
"-H", 'Connection: keep-alive', "-H", 'Upgrade-Insecure-Requests: 1'])
media = mastodon.media_post("tmp.jpg")
# Toot!
# If post is too long, split it into main-toot and non-listed replies.
is_main_toot = True
for toot_text in toots_text:
if post['link'] and is_main_toot:
@ -87,7 +89,7 @@ if post['time'] != database[config['facebook_page']]['last_edited']:
statuses.append(mastodon.status_post(toot))
is_main_toot = False
else:
statuses.append(mastodon.status_post(toot), in_reply_to_id = statuses[-1])
statuses.append(mastodon.status_post(toot), in_reply_to_id = statuses[-1], visibility = 'unlisted' )
# Update database of bridging history
database[config['facebook_page']]['last_post_id'] = post['post_id']

Loading…
Cancel
Save