mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 03:51:28 +00:00
Admins and moderators visible in their profile
This commit is contained in:
parent
fb9836a1ce
commit
b4b3bfc063
|
@ -11,6 +11,8 @@ import (
|
|||
|
||||
type AccountPleroma struct {
|
||||
Relationship Relationship `json:"relationship"`
|
||||
IsAdmin bool `json:"is_admin"`
|
||||
IsModerator bool `json:"is_moderator"`
|
||||
}
|
||||
|
||||
// Account hold information for mastodon account.
|
||||
|
@ -66,7 +68,7 @@ func (c *Client) GetAccount(ctx context.Context, id string) (*Account, error) {
|
|||
return nil, err
|
||||
}
|
||||
if len(rs) > 0 {
|
||||
account.Pleroma = &AccountPleroma{*rs[0]}
|
||||
account.Pleroma = &AccountPleroma{*rs[0], account.Pleroma.IsAdmin, account.Pleroma.IsModerator}
|
||||
}
|
||||
}
|
||||
return &account, nil
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
{{if not .IsCurrent}}
|
||||
<div>
|
||||
<span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
|
||||
<span> {{if .User.Pleroma.IsAdmin}} your dear admin - {{end}} </span>
|
||||
<span> {{if .User.Pleroma.IsModerator}} your dear moderator - {{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">
|
||||
|
|
Loading…
Reference in a new issue