mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Mastodon: Fixed media uploads. Closes #513
This commit is contained in:
parent
ad8667a13c
commit
d0e18178c6
@ -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 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.
|
* 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.
|
* 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
|
## Changes in version 2023.2.3
|
||||||
|
|
||||||
|
@ -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"])
|
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:
|
else:
|
||||||
for i in obj["attachments"]:
|
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)
|
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"])
|
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:
|
if item != None:
|
||||||
|
Loading…
Reference in New Issue
Block a user