Fix the behavior of the follow button

There was a bug in Tera and in the User::is_following function.

Fix #146
This commit is contained in:
Bat
2018-07-20 17:51:32 +02:00
parent e581ef7d09
commit b0e75f4d63
3 changed files with 23 additions and 4 deletions
+4 -3
View File
@@ -18,11 +18,12 @@
<a class="inline-block button" href="{{ user.ap_url }}">{{ "Open on {{ instance_url }}" | _(instance_url=instance_url) }}</a>
{% endif %}
{% if not is_self and account %}
{% set not_self = not is_self %}
{% if not_self and (account is defined) %}
{% if follows %}
<a href="follow/" class="inline-block button">{{ "Follow" | _ }}</a>
{% else %}
<a href="follow/" class="inline-block button">{{ "Unfollow" | _ }}</a>
{% else %}
<a href="follow/" class="inline-block button">{{ "Follow" | _ }}</a>
{% endif %}
{% endif %}
</div>