Merge pull request #327 from alexmshepherd/status_reply-patch
Status reply patch
This commit is contained in:
commit
0e0e8cd687
@ -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()
|
||||||
|
try:
|
||||||
mentioned_accounts[to_status.account.id] = to_status.account.acct
|
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user