From d139cb752c6deb24f17453dc982a9939aa35c4fd Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Tue, 11 Oct 2022 21:59:22 +0300 Subject: [PATCH] Fix for mastodon compatible. This is bare bones solution, I know --- mastodon/accounts.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mastodon/accounts.go b/mastodon/accounts.go index 6aee2e3..8ea55c5 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -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