diff --git a/pages.py b/pages.py index 3bb31d9..1a68b07 100644 --- a/pages.py +++ b/pages.py @@ -23,6 +23,7 @@ from oauth_dropins.webutil.flask_util import ( import common from common import DOMAIN_RE from flask_app import app, cache +import ids from models import fetch_objects, fetch_page, Follower, Object, PAGE_SIZE, PROTOCOLS from protocol import Protocol @@ -38,6 +39,7 @@ TEMPLATE_VARS = { 'as1': as1, 'as2': as2, 'g': g, + 'ids': ids, 'isinstance': isinstance, 'logs': logs, 'PROTOCOLS': PROTOCOLS, diff --git a/templates/user_base.html b/templates/user_base.html index f547c96..1a0c0e1 100644 --- a/templates/user_base.html +++ b/templates/user_base.html @@ -57,9 +57,11 @@ + {% set copies = user.copies|map(attribute='protocol')|list %} {% for proto in set(PROTOCOLS.values()) %} - {% if proto and not isinstance(user, proto) - and proto.LABEL not in ('atproto', 'ui', 'web') %} + {% if proto and not isinstance(user, proto) + and proto.LABEL not in ('ui', 'web') + and (proto.LABEL not in ids.COPIES_PROTOCOLS or proto.LABEL in copies) %} ·