From 97815f807ae41342a8ea6eb6ace6345f58fc53c1 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Fri, 11 Nov 2022 15:05:56 -0600 Subject: [PATCH] get description only for images, for now --- src/sessions/mastodon/templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sessions/mastodon/templates.py b/src/sessions/mastodon/templates.py index 02485829..0bb25780 100644 --- a/src/sessions/mastodon/templates.py +++ b/src/sessions/mastodon/templates.py @@ -35,11 +35,11 @@ def process_image_descriptions(media_attachments): """ Attempt to extract information for image descriptions. """ image_descriptions = [] for media in media_attachments: - if media.get("description") != None: + if media.get("description", "") != "": image_descriptions.append(media.get("description")) idescriptions = "" for image in image_descriptions: - idescriptions += _("Image description: {}").format(image) + idescriptions = idescriptions + _("Image description: {}").format(image) + " " return idescriptions def remove_unneeded_variables(template, variables):