mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-10 13:58:46 +00:00
Admins and moderators visible in their profile
This commit is contained in:
parent
fb9836a1ce
commit
b4b3bfc063
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue