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