From e0f43c3668056d05bd53304a251007bad956fb15 Mon Sep 17 00:00:00 2001 From: TLSM Date: Wed, 9 Nov 2022 04:59:50 -0500 Subject: [PATCH] Remove is_nofollow from backend. --- files/classes/user.py | 1 - files/routes/settings.py | 1 - files/routes/users.py | 3 --- files/templates/user_listing.html | 2 +- files/templates/userpage.html | 10 +++++----- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 829582b8a..96523c1d2 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -117,7 +117,6 @@ class User(Base): defaultsortingcomments = Column(String, default="hot") defaultsorting = Column(String, default="hot") defaulttime = Column(String, default=DEFAULT_TIME_FILTER) - is_nofollow = Column(Boolean, default=False) custom_filter_list = Column(String) discord_id = Column(String) original_username = Column(String) diff --git a/files/routes/settings.py b/files/routes/settings.py index 4b4b9b58c..03452f24e 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -120,7 +120,6 @@ def settings_personal_post(v): updated = updated or update_flag("sigs_disabled", "sigs_disabled") updated = updated or update_flag("over_18", "over_18") updated = updated or update_flag("is_private", "private") - updated = updated or update_flag("is_nofollow", "nofollow") if not updated and request.values.get("spider", v.spider) != v.spider and v.spider <= 1: updated = True diff --git a/files/routes/users.py b/files/routes/users.py index 576ed06a9..c8042951c 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -841,9 +841,6 @@ def follow_user(username, v): if target.id==v.id: abort(400, "You can't follow yourself!") - if target.is_nofollow: - abort(403, "This user has disallowed other users from following them!") - if g.db.query(Follow).filter_by(user_id=v.id, target_id=target.id).one_or_none(): return {"message": f"@{target.username} has been followed!"} diff --git a/files/templates/user_listing.html b/files/templates/user_listing.html index 2be7e234b..13cfa8c7a 100644 --- a/files/templates/user_listing.html +++ b/files/templates/user_listing.html @@ -17,7 +17,7 @@
@{{u.username}}
{% if v %} - {% if v.id!=u.id and not u.is_private and not u.is_nofollow %} + {% if v.id != u.id and not u.is_private %}
diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 205ed5db9..8660052a0 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -13,7 +13,7 @@ - + @@ -24,7 +24,7 @@ - + {% endblock %} @@ -166,7 +166,7 @@
- + {% if FEATURES['USERS_SUICIDE'] -%} @@ -309,7 +309,7 @@ {% endif %} - {% if v and v.id != u.id and v.has_follower(u) and not v.is_nofollow %} + {% if v and v.id != u.id and v.has_follower(u) %} Follows you {% endif %} @@ -417,7 +417,7 @@ {% if v and v.id != u.id %} - + {% if FEATURES['USERS_SUICIDE'] -%}