mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
respect maximum post privacy setting when replying
This commit is contained in:
parent
6b8931ec3d
commit
386d32367a
1 changed files with 4 additions and 0 deletions
|
@ -130,6 +130,10 @@ def make_post(args):
|
||||||
|
|
||||||
print(post)
|
print(post)
|
||||||
visibility = bot['post_privacy'] if len(args) == 1 else args[2]
|
visibility = bot['post_privacy'] if len(args) == 1 else args[2]
|
||||||
|
visibilities = ['public', 'unlisted', 'private']
|
||||||
|
if visibilities.index(visibility) < visibilities.index(bot['post_privacy']):
|
||||||
|
# if post_privacy is set to a more restricted level than the visibility of the post we're replying to, use the user's setting
|
||||||
|
visibility = bot['post_privacy']
|
||||||
if acct is not None:
|
if acct is not None:
|
||||||
post = "{} {}".format(acct, post)
|
post = "{} {}".format(acct, post)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue