mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Follow [Twitter's guidance](https://dev.twitter.com/rest/reference/post/media/upload-finalize) for media uploads: "If and (only if) the response of the FINALIZE command contains a processing_info field, it may also be necessary to use a STATUS command and wait for it to return success before proceeding to Tweet creation."
This commit is contained in:
parent
51ff6009a3
commit
10c0744c4a
@ -116,6 +116,9 @@ class TwitterNotificationService(BaseNotificationService):
|
||||
self.log_error_resp(resp)
|
||||
return None
|
||||
|
||||
if resp.json().get('processing_info') is None:
|
||||
return callback(media_id)
|
||||
|
||||
self.check_status_until_done(media_id, callback)
|
||||
|
||||
def media_info(self, media_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user