diff --git a/files/routes/settings.py b/files/routes/settings.py index 7b6a43c0d..6e2c06e5d 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -709,7 +709,10 @@ def settings_block_user(v): if not user: return {"error": "That user doesn't exist."}, 404 - if user.unblockable: return {"error": "This user is unblockable."}, 403 + if user.unblockable: + send_repeatable_notification(user.id, f"@{v.username} has tried to block you and failed because of your unblockable status!") + g.db.commit() + return {"error": "This user is unblockable."}, 403 if user.id == v.id: return {"error": "You can't block yourself."}, 409 diff --git a/files/routes/users.py b/files/routes/users.py index 1c8b9521c..fa8bc347c 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1023,7 +1023,10 @@ def unfollow_user(username, v): target = get_user(username) - if target.fish: return {"error": "You can't unfollow this user!"} + if target.fish: + send_repeatable_notification(target.id, f"@{v.username} has tried to unfollow you and failed because of your fish award!") + g.db.commit() + return {"error": "You can't unfollow this user!"} follow = g.db.query(Follow).filter_by(user_id=v.id, target_id=target.id).one_or_none() diff --git a/files/templates/user_listing.html b/files/templates/user_listing.html index 54d6d5eea..50dd17227 100644 --- a/files/templates/user_listing.html +++ b/files/templates/user_listing.html @@ -15,7 +15,7 @@ {% if v.id!=u.id and not u.is_private and not u.is_nofollow %}
Follow
- {% if not u.fish %}
Unfollow
{% endif %} +
Unfollow
{% endif %} {% else %}
Follow
diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 8fbc08238..ad6c6b6d7 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -168,7 +168,8 @@
{% if v and v.id != u.id %} - {% if not u.fish %}Unfollow{% endif %} + Unfollow + Follow Message @@ -479,7 +480,8 @@ {% endif %} {% if v and v.id != u.id %} - {% if not u.fish %}Unfollow{% endif %} + Unfollow + Follow Message Get them help