Fix for mastodon compatible. This is bare bones solution, I know

This commit is contained in:
localhost_frssoft 2022-10-11 21:59:22 +03:00
parent b4b3bfc063
commit d139cb752c

View File

@ -68,7 +68,11 @@ func (c *Client) GetAccount(ctx context.Context, id string) (*Account, error) {
return nil, err return nil, err
} }
if len(rs) > 0 { if len(rs) > 0 {
account.Pleroma = &AccountPleroma{*rs[0], account.Pleroma.IsAdmin, account.Pleroma.IsModerator} if account.Pleroma != nil {
account.Pleroma = &AccountPleroma{*rs[0], account.Pleroma.IsAdmin, account.Pleroma.IsModerator}
} else {
account.Pleroma = &AccountPleroma{*rs[0], false, false}
}
} }
} }
return &account, nil return &account, nil