check for "actor" key in item.meta before render

This commit is contained in:
Chaiwat Suttipongsakul 2019-01-22 01:03:51 +07:00
parent 0305c4637b
commit d093d03748

View file

@ -34,6 +34,7 @@
{% for item in outbox_data %} {% for item in outbox_data %}
{% if item | has_type('Announce') %} {% if item | has_type('Announce') %}
{% if "actor" in item.meta %}
{% set boost_actor = item.meta.actor %} {% set boost_actor = item.meta.actor %}
{% if session.logged_in %} {% if session.logged_in %}
<div style="margin-left:65px;padding-bottom:5px;margin-bottom:15px;"> <div style="margin-left:65px;padding-bottom:5px;margin-bottom:15px;">
@ -50,6 +51,7 @@
<span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name }}</a> boosted</span> <span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name }}</a> boosted</span>
</p> </p>
{% endif %} {% endif %}
{% endif %}
{% if item.meta.object %} {% if item.meta.object %}
{{ utils.display_note(item.meta.object, ui=False, meta={'actor': item.meta.object_actor}) }} {{ utils.display_note(item.meta.object, ui=False, meta={'actor': item.meta.object_actor}) }}
{% endif %} {% endif %}