mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-05 05:26:07 -04:00
Mastodon: Allow adding descriptions to all supported media. Closes #516
This commit is contained in:
@@ -210,8 +210,8 @@ 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"], synchronous=True)
|
||||
media_ids.append(img.id)
|
||||
media = self.api_call("media_post", media_file=i["file"], description=i["description"], synchronous=True)
|
||||
media_ids.append(media.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:
|
||||
in_reply_to_id = item["id"]
|
||||
|
@@ -42,7 +42,7 @@ def process_image_descriptions(media_attachments):
|
||||
image_descriptions.append(media.get("description"))
|
||||
idescriptions = ""
|
||||
for image in image_descriptions:
|
||||
idescriptions = idescriptions + _("Image description: {}").format(image) + "\n"
|
||||
idescriptions = idescriptions + _("Media description: {}").format(image) + "\n"
|
||||
return idescriptions
|
||||
|
||||
def render_post(post, template, relative_times=False, offset_hours=0):
|
||||
|
Reference in New Issue
Block a user