Tweak the attachment handling for Hubzilla support

This commit is contained in:
Thomas Sileo
2018-07-24 22:10:39 +02:00
parent 4910729b2c
commit cf46ddcb60
2 changed files with 6 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
<ul>
{% endif %}
{% for a in obj.attachment %}
{% if a.mediaType.startswith("image/") %}
{% if (a.mediaType and a.mediaType.startswith("image/")) or (a.type and a.type == 'Image') %}
<a href="{{ a.url | get_attachment_url(None) }}"><img src="{{a.url | get_attachment_url(720) }}" class="img-attachment"></a>
{% else %}
<li><a href="{{a.url }}" class="l">{% if a.filename %}{{ a.filename }}{% else %}{{ a.url }}{% endif %}</a></li>