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
1 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,11 @@ 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.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