aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete <pete@debu.gs>2022-08-15 06:57:41 -0700
committerr <r@freesoftwareextremist.com>2022-09-09 14:49:51 +0000
commit5f688c6318191627775ae44221eb75cb6ed2e905 (patch)
treeafa2c5196040a8d2f3e62584b8afeb0309bc1154
parent1661219ab6e3c12b29d676d57ce452feb81d0dd9 (diff)
downloadbloat-5f688c6318191627775ae44221eb75cb6ed2e905.tar.gz
bloat-5f688c6318191627775ae44221eb75cb6ed2e905.zip
Show BlockedBy on user page
Just show this information. No blockbots required.
-rw-r--r--mastodon/accounts.go1
-rw-r--r--templates/user.tmpl1
2 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/accounts.go b/mastodon/accounts.go
index df0a3b7..dbd0a48 100644
--- a/mastodon/accounts.go
+++ b/mastodon/accounts.go
@@ -189,6 +189,7 @@ type Relationship struct {
Following bool `json:"following"`
FollowedBy bool `json:"followed_by"`
Blocking bool `json:"blocking"`
+ BlockedBy bool `json:"blocked_by"`
Muting bool `json:"muting"`
MutingNotifications bool `json:"muting_notifications"`
Subscribing bool `json:"subscribing"`
diff --git a/templates/user.tmpl b/templates/user.tmpl
index dccce7c..5342efe 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -20,6 +20,7 @@
{{if not .IsCurrent}}
<div>
<span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
+ {{if .User.Pleroma.Relationship.BlockedBy}} blocks you - {{end}}
{{if .User.Pleroma.Relationship.Following}}
<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">