diff --git a/doc/changelog.md b/doc/changelog.md index 8230bce3..6cac16cb 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -11,6 +11,7 @@ This release focuses on fixing some important bugs that have been reported in th * Added notification when a user joins an instance. This notification is only available for administrators. * Added option to disable Streaming in the account options. This can be useful if TWBlue, for some reason, repeatedly calls the instance API. * Improved the code that works with the Streaming API to reduce the number of reconnection attempts TWBlue performs. + * Fixed media uploads for audio, video and gifvs. ([#513](https://github.com/MCV-Software/TWBlue/issues/513)) ## Changes in version 2023.2.3 diff --git a/src/sessions/mastodon/session.py b/src/sessions/mastodon/session.py index 67264627..ee3a7eea 100644 --- a/src/sessions/mastodon/session.py +++ b/src/sessions/mastodon/session.py @@ -210,7 +210,7 @@ class Session(base.baseSession): poll = self.api.make_poll(options=obj["attachments"][0]["options"], expires_in=obj["attachments"][0]["expires_in"], multiple=obj["attachments"][0]["multiple"], hide_totals=obj["attachments"][0]["hide_totals"]) else: for i in obj["attachments"]: - img = self.api_call("media_post", media_file=i["file"], description=i["description"]) + img = self.api_call("media_post", media_file=i["file"], description=i["description"], synchronous=True) media_ids.append(img.id) item = self.api_call(call_name="status_post", status=text, _sound="tweet_send.ogg", in_reply_to_id=in_reply_to_id, media_ids=media_ids, visibility=visibility, poll=poll, sensitive=obj["sensitive"], spoiler_text=obj["spoiler_text"]) if item != None: