hide mastodon info if locked and not followed/ing

This commit is contained in:
Your Name 2024-06-17 09:49:39 -04:00 committed by Henri Dickson
parent 7d9c58edf0
commit 43a7bf5174
2 changed files with 11 additions and 9 deletions

View file

@ -34,7 +34,7 @@ def home(request):
def ap_redirect(request, uri):
return redirect(request.get_full_path().replace("~neodb~", "/"))
return redirect(request.get_full_path().replace("/~neodb~/", "/"))
def nodeinfo2(request):

View file

@ -48,14 +48,16 @@
</span>
{% endif %}
{% if identity.user.mastodon_account %}
<span>
<a href="{{ identity.user.mastodon_account.url }}"
target="_blank"
rel="noopener"
title="@{{ identity.user.mastodon_acct }}">
<i class="fa-brands fa-mastodon"></i>
</a>
</span>
{% if not identity.locked or request.user.is_superuser or relationship.requested or relationship.status %}
<span>
<a href="{{ identity.user.mastodon_account.url }}"
target="_blank"
rel="noopener"
title="@{{ identity.user.mastodon_acct }}">
<i class="fa-brands fa-mastodon"></i>
</a>
</span>
{% endif %}
{% endif %}
{% endif %}
{% if relationship.requested %}