summaryrefslogtreecommitdiff
path: root/internal/processing/fromfederator.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/fromfederator.go
parentadd file size checks (diff)
downloadgotosocial-667e7f112ce7b5b7452c392bbbe393a4c998508d.tar.xz
update remote account get/deref logic
Diffstat (limited to 'internal/processing/fromfederator.go')
-rw-r--r--internal/processing/fromfederator.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/processing/fromfederator.go b/internal/processing/fromfederator.go
index 533d00242..8b575dda8 100644
--- a/internal/processing/fromfederator.go
+++ b/internal/processing/fromfederator.go
@@ -22,6 +22,7 @@ import (
"context"
"errors"
"fmt"
+ "net/url"
"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/ap"
@@ -232,7 +233,12 @@ func (p *processor) processUpdateAccountFromFederator(ctx context.Context, feder
return errors.New("profile was not parseable as *gtsmodel.Account")
}
- if _, err := p.federator.EnrichRemoteAccount(ctx, federatorMsg.ReceivingAccount.Username, incomingAccount); err != nil {
+ incomingAccountURL, err := url.Parse(incomingAccount.URI)
+ if err != nil {
+ return err
+ }
+
+ if _, err := p.federator.GetRemoteAccount(ctx, federatorMsg.ReceivingAccount.Username, incomingAccountURL, false, true); err != nil {
return fmt.Errorf("error enriching updated account from federator: %s", err)
}