Show BlockedBy on user page

Just show this information. No blockbots required.
This commit is contained in:
Pete 2022-08-15 06:57:41 -07:00 committed by r
parent 1661219ab6
commit 5f688c6318
2 changed files with 2 additions and 0 deletions

View file

@ -189,6 +189,7 @@ type Relationship struct {
Following bool `json:"following"` Following bool `json:"following"`
FollowedBy bool `json:"followed_by"` FollowedBy bool `json:"followed_by"`
Blocking bool `json:"blocking"` Blocking bool `json:"blocking"`
BlockedBy bool `json:"blocked_by"`
Muting bool `json:"muting"` Muting bool `json:"muting"`
MutingNotifications bool `json:"muting_notifications"` MutingNotifications bool `json:"muting_notifications"`
Subscribing bool `json:"subscribing"` Subscribing bool `json:"subscribing"`

View file

@ -20,6 +20,7 @@
{{if not .IsCurrent}} {{if not .IsCurrent}}
<div> <div>
<span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span> <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
{{if .User.Pleroma.Relationship.BlockedBy}} blocks you - {{end}}
{{if .User.Pleroma.Relationship.Following}} {{if .User.Pleroma.Relationship.Following}}
<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post"> <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">