projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8b02de
)
Improve clarity of and optimize API.send_direct_message
author
Harmon
<Harmon758@gmail.com>
Mon, 11 Jan 2021 16:40:01 +0000
(10:40 -0600)
committer
Harmon
<Harmon758@gmail.com>
Mon, 11 Jan 2021 16:42:56 +0000
(10:42 -0600)
tweepy/api.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/api.py
b/tweepy/api.py
index e07f690caf013f490dc04e39c129ecab448b92eb..1f5984b49de10dbf2c65ff482d06ff0763790703 100644
(file)
--- a/
tweepy/api.py
+++ b/
tweepy/api.py
@@
-461,8
+461,10
@@
class API:
'options': quick_reply_options
}
if attachment_type is not None and attachment_media_id is not None:
- message_data['attachment'] = {'type': attachment_type}
- message_data['attachment']['media'] = {'id': attachment_media_id}
+ message_data['attachment'] = {
+ 'type': attachment_type,
+ 'media': {'id': attachment_media_id}
+ }
return bind_api(
api=self,
path='/direct_messages/events/new.json',