diff --git a/mastodon/accounts.go b/mastodon/accounts.go index dbd0a48..6aee2e3 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -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 diff --git a/templates/user.tmpl b/templates/user.tmpl index 8d77948..b5a65ca 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -20,6 +20,8 @@ {{if not .IsCurrent}}