Stop prefilling @handle in Bluesky replies and DMs, fix duplicate Mastodon mention

Bluesky replies carry parent/root references, so the author is notified
without a mention in the text. The prefilled "@handle" only created a
redundant mention facet, and used the reposter's handle for reposts.
Direct messages are plain text sent to a conversation, so the prefill was
useless there too.

In Mastodon's send_message, the author check compared the bare acct with
a list of "@acct " strings, so it never matched and duplicated the mention.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jesús Pavón Abián
2026-11-01 17:31:24 +01:00
co-authored by Claude Sonnet 5.5
parent 9822f25809
commit a762f94546
3 changed files with 5 additions and 18 deletions
+1 -1
View File
@@ -449,7 +449,7 @@ class BaseBuffer(base.Buffer):
users.append("@{} ".format(item.reblog.account.acct))
else:
users = ["@{} ".format(user.acct) for user in item.mentions if user.id != self.session.db["user_id"]]
if item.account.acct not in users and item.account.id != self.session.db["user_id"]:
if "@{} ".format(item.account.acct) not in users and item.account.id != self.session.db["user_id"]:
users.insert(0, "@{} ".format(item.account.acct))
users_str = "".join(users)
post = messages.post(session=self.session, title=title, caption=caption, text=users_str)