diff --git a/app.py b/app.py index 494fcee..44a0da1 100644 --- a/app.py +++ b/app.py @@ -1618,6 +1618,9 @@ def following(): ) ) + if config.HIDE_FOLLOWING: + abort(404) + following, older_than, newer_than = paginated_query(DB.activities, q) following = [ (doc["remote_id"], get_backend().fetch_iri(doc["activity"]["object"])) diff --git a/config.py b/config.py index 8c78fb6..9031b52 100644 --- a/config.py +++ b/config.py @@ -72,6 +72,8 @@ with open(os.path.join(KEY_DIR, "me.yml")) as f: PASS = conf["pass"] EXTRA_INBOXES = conf.get("extra_inboxes", []) + HIDE_FOLLOWING = strtobool(conf.get("hide_following", "false")) + # Theme-related config theme_conf = conf.get("theme", {}) THEME_STYLE = ThemeStyle(theme_conf.get("style", DEFAULT_THEME_STYLE)) diff --git a/templates/header.html b/templates/header.html index 1eb54a8..1d00568 100644 --- a/templates/header.html +++ b/templates/header.html @@ -16,7 +16,7 @@
  • With replies {{ with_replies_count }}
  • Liked {{ liked_count }}
  • Followers {{ followers_count }}
  • -
  • Following {{ following_count }}
  • +{% if not config.HIDE_FOLLOWING or session.logged_in %}
  • Following {{ following_count }}
  • {% endif %}