Mastodon: Set visibility in replies as unlisted by default. Closes #504

This commit is contained in:
Manuel Cortez 2023-01-29 13:11:34 -06:00
parent 97d4fea563
commit fd176f92d3
No known key found for this signature in database
GPG Key ID: 9E0735CA15EFE790
2 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,7 @@ As we're sure users of TWBlue and other third-party clients already know, Twitte
* In the session manager, Mastodon sessions are now displayed including the instance to avoid confusion. * In the session manager, Mastodon sessions are now displayed including the instance to avoid confusion.
* TWBlue will now read default visibility preferences when posting new statuses, and display sensitive content. These preferences can be set on the mastodon instance, in the account's preferences section. If you wish to change TWBlue's behavior and have it not read those preferences from your instance, but instead set the default public visibility and hide sensitive content, you can uncheck the Read preferences from instance checkbox in the account options. * TWBlue will now read default visibility preferences when posting new statuses, and display sensitive content. These preferences can be set on the mastodon instance, in the account's preferences section. If you wish to change TWBlue's behavior and have it not read those preferences from your instance, but instead set the default public visibility and hide sensitive content, you can uncheck the Read preferences from instance checkbox in the account options.
* If a mastodon instance is not active or there are errors during login, TWBlue will report it in the log file and will continue with other sessions. * If a mastodon instance is not active or there are errors during login, TWBlue will report it in the log file and will continue with other sessions.
* When replying to someone in a public post, TWBlue will default to "unlisted" as its visibility setting. This is done so replies will not clutter local and federated timelines. This setting might be changed when writing the reply, though. ([#504,](https://github.com/MCV-Software/TWBlue/issues/504))
## Changes in version 2022.12.13 ## Changes in version 2022.12.13

View File

@ -333,7 +333,9 @@ class BaseBuffer(base.Buffer):
users_str = "".join(users) users_str = "".join(users)
post = messages.post(session=self.session, title=title, caption=caption, text=users_str) post = messages.post(session=self.session, title=title, caption=caption, text=users_str)
visibility_settings = dict(public=0, unlisted=1, private=2, direct=3) visibility_settings = dict(public=0, unlisted=1, private=2, direct=3)
post.message.visibility.SetSelection(visibility_settings.get(visibility)) # Set unlisted by default, so we will not clutter other user's buffers with replies.
# see https://github.com/MCV-Software/TWBlue/issues/504
post.message.visibility.SetSelection(visibility_settings.get("unlisted"))
# Respect content warning settings. # Respect content warning settings.
if item.sensitive: if item.sensitive:
post.message.sensitive.SetValue(item.sensitive) post.message.sensitive.SetValue(item.sensitive)