summaryrefslogtreecommitdiff
path: root/internal/processing/account/get.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-24 13:12:17 +0100
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2022-01-24 13:12:17 +0100
commit667e7f112ce7b5b7452c392bbbe393a4c998508d (patch)
treef167df9f47f195669f81dd0111bc4704bf7faf4d /internal/processing/account/get.go
parentadd file size checks (diff)
downloadgotosocial-667e7f112ce7b5b7452c392bbbe393a4c998508d.tar.xz
update remote account get/deref logic
Diffstat (limited to 'internal/processing/account/get.go')
-rw-r--r--internal/processing/account/get.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/processing/account/get.go b/internal/processing/account/get.go
index e96040db7..2571d7af1 100644
--- a/internal/processing/account/get.go
+++ b/internal/processing/account/get.go
@@ -22,6 +22,7 @@ import (
"context"
"errors"
"fmt"
+ "net/url"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
@@ -56,7 +57,12 @@ func (p *processor) Get(ctx context.Context, requestingAccount *gtsmodel.Account
// last-minute check to make sure we have remote account header/avi cached
if targetAccount.Domain != "" {
- a, err := p.federator.EnrichRemoteAccount(ctx, requestingAccount.Username, targetAccount)
+ targetAccountURI, err := url.Parse(targetAccount.URI)
+ if err != nil {
+ return nil, fmt.Errorf("error parsing url %s: %s", targetAccount.URI, err)
+ }
+
+ a, err := p.federator.GetRemoteAccount(ctx, requestingAccount.Username, targetAccountURI, true, false)
if err == nil {
targetAccount = a
}