Admins and moderators visible in their profile

This commit is contained in:
localhost_frssoft 2022-10-11 19:06:24 +03:00
parent fb9836a1ce
commit b4b3bfc063
2 changed files with 5 additions and 1 deletions

View file

@ -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