Merge pull request #327 from alexmshepherd/status_reply-patch

Status reply patch
pull/306/head^2
Lorenz Diener 2023-04-23 18:51:59 +03:00 zatwierdzone przez GitHub
commit 0e0e8cd687
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -320,6 +320,8 @@ class Mastodon(Internals):
the users that are being replied to to the status text and retains the users that are being replied to to the status text and retains
CW and visibility if not explicitly overridden. CW and visibility if not explicitly overridden.
Note that `to_status` should be a :ref:`status dict <status dict>` and not an ID.
Set `untag` to True if you want the reply to only go to the user you Set `untag` to True if you want the reply to only go to the user you
are replying to, removing every other mentioned user from the are replying to, removing every other mentioned user from the
conversation. conversation.
@ -333,7 +335,10 @@ class Mastodon(Internals):
# Determine users to mention # Determine users to mention
mentioned_accounts = collections.OrderedDict() mentioned_accounts = collections.OrderedDict()
mentioned_accounts[to_status.account.id] = to_status.account.acct try:
mentioned_accounts[to_status.account.id] = to_status.account.acct
except AttributeError as e:
raise TypeError("to_status must specify a status dict!") from e
if not untag: if not untag:
for account in to_status.mentions: for account in to_status.mentions: