From f87ced817f06944ee1ed95cce3d6509c344c6ecf Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Sun, 29 Jan 2023 16:12:37 -0600 Subject: [PATCH] Fixed visibility setting for replies to dm's. Closes #507 --- src/controller/buffers/mastodon/base.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controller/buffers/mastodon/base.py b/src/controller/buffers/mastodon/base.py index 49162987..00955359 100644 --- a/src/controller/buffers/mastodon/base.py +++ b/src/controller/buffers/mastodon/base.py @@ -322,6 +322,9 @@ class BaseBuffer(base.Buffer): else: title = _("Reply to {}").format(item.account.username) caption = _("Write your reply here") + # Set unlisted by default, so we will not clutter other user's buffers with replies. + # see https://github.com/MCV-Software/TWBlue/issues/504 + visibility = "unlisted" if item.reblog != None: users = ["@{} ".format(user.acct) for user in item.reblog.mentions if user.id != self.session.db["user_id"]] if item.reblog.account.acct != item.account.acct and "@{} ".format(item.reblog.account.acct) not in users: @@ -333,9 +336,7 @@ class BaseBuffer(base.Buffer): users_str = "".join(users) post = messages.post(session=self.session, title=title, caption=caption, text=users_str) visibility_settings = dict(public=0, unlisted=1, private=2, direct=3) - # 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")) + post.message.visibility.SetSelection(visibility_settings.get(visibility)) # Respect content warning settings. if item.sensitive: post.message.sensitive.SetValue(item.sensitive)