mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 17:41:08 +00:00
Merge pull request #2241 from bookwyrm-social/nonviable-follow-requests
Only show pending follow requests from active users
This commit is contained in:
commit
6fc44cff8b
2 changed files with 6 additions and 1 deletions
|
@ -174,6 +174,11 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
property_fields = [("following_link", "following")]
|
||||
field_tracker = FieldTracker(fields=["name", "avatar"])
|
||||
|
||||
@property
|
||||
def active_follower_requests(self):
|
||||
"""Follow requests from active users"""
|
||||
return self.follower_requests.filter(is_active=True)
|
||||
|
||||
@property
|
||||
def confirmation_link(self):
|
||||
"""helper for generating confirmation links"""
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
{% include 'ostatus/remote_follow_button.html' with user=user %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_self and user.follower_requests.all %}
|
||||
{% if is_self and user.active_follower_requests.all %}
|
||||
<div class="follow-requests">
|
||||
<h2>{% trans "Follow Requests" %}</h2>
|
||||
{% for requester in user.follower_requests.all %}
|
||||
|
|
Loading…
Reference in a new issue