summaryrefslogtreecommitdiff
path: root/internal/federation/dereferencing/dereferencer.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-05-09 12:16:10 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-09 11:16:10 +0100
commit0e29f1f5bb68a48d9b837d7f4e0a16370734955b (patch)
treef08d203ec8ca8aeea728e5251b1dc3956524b4f4 /internal/federation/dereferencing/dereferencer.go
parent[chore/performance] Make sender multiplier configurable (#1750) (diff)
downloadgotosocial-0e29f1f5bb68a48d9b837d7f4e0a16370734955b.tar.xz
[feature] Enable federation in/out of profile PropertyValue fields (#1722)
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
Diffstat (limited to 'internal/federation/dereferencing/dereferencer.go')
-rw-r--r--internal/federation/dereferencing/dereferencer.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/federation/dereferencing/dereferencer.go b/internal/federation/dereferencing/dereferencer.go
index 7c00ceec5..181196caa 100644
--- a/internal/federation/dereferencing/dereferencer.go
+++ b/internal/federation/dereferencing/dereferencer.go
@@ -35,14 +35,15 @@ import (
type Dereferencer interface {
// GetAccountByURI will attempt to fetch an account by its URI, first checking the database and in the case of a remote account will either check the
// last_fetched (and updating if beyond fetch interval) or dereferencing for the first-time if this remote account has never been encountered before.
- GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL, block bool) (*gtsmodel.Account, error)
+ GetAccountByURI(ctx context.Context, requestUser string, uri *url.URL) (*gtsmodel.Account, error)
// GetAccountByUsernameDomain will attempt to fetch an account by username@domain, first checking the database and in the case of a remote account will either
// check the last_fetched (and updating if beyond fetch interval) or dereferencing for the first-time if this remote account has never been encountered before.
- GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string, block bool) (*gtsmodel.Account, error)
+ GetAccountByUsernameDomain(ctx context.Context, requestUser string, username string, domain string) (*gtsmodel.Account, error)
- // UpdateAccount updates the given account if last_fetched is beyond fetch interval (or if force is set). An updated account model is returned, any media fetching is done async.
- UpdateAccount(ctx context.Context, requestUser string, account *gtsmodel.Account, force bool) (*gtsmodel.Account, error)
+ // RefreshAccount forces a refresh of the given account by fetching the current/latest state of the account from the remote instance.
+ // An updated account model is returned, but not yet inserted/updated in the database; this is the caller's responsibility.
+ RefreshAccount(ctx context.Context, requestUser string, accountable ap.Accountable, account *gtsmodel.Account) (*gtsmodel.Account, error)
GetStatus(ctx context.Context, username string, remoteStatusID *url.URL, refetch, includeParent bool) (*gtsmodel.Status, ap.Statusable, error)