Show when a follow is pending
This commit is contained in:
parent
9415ebb4f4
commit
8729baaea4
|
@ -31,7 +31,9 @@
|
|||
{% endif %}
|
||||
{% if follow %}
|
||||
<input type="hidden" name="action" value="unfollow">
|
||||
<button class="destructive">Unfollow</button>
|
||||
<button class="destructive">
|
||||
{% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
|
||||
</button>
|
||||
{% else %}
|
||||
<input type="hidden" name="action" value="follow">
|
||||
<button>Follow</button>
|
||||
|
|
|
@ -167,6 +167,12 @@ class Follow(StatorModel):
|
|||
"source", "source__domain", "target"
|
||||
).aget(pk=self.pk)
|
||||
|
||||
### Helper properties ###
|
||||
|
||||
@property
|
||||
def pending(self):
|
||||
return self.state in [FollowStates.unrequested, FollowStates.local_requested]
|
||||
|
||||
### ActivityPub (outbound) ###
|
||||
|
||||
def to_ap(self):
|
||||
|
|
Loading…
Reference in New Issue