mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-10-31 22:40:01 +00:00
don't finger instance accounts
This commit is contained in:
parent
2f1b638357
commit
61a8d97bc3
1 changed files with 3 additions and 3 deletions
|
@ -173,10 +173,10 @@ func (d *deref) GetRemoteAccount(ctx context.Context, params GetRemoteAccountPar
|
|||
accountDomain = params.RemoteAccountHost
|
||||
}
|
||||
|
||||
// to save on remote calls, only webfinger if we don't have a remoteAccount yet, or if we haven't
|
||||
// fingered the remote account for at least 2 days
|
||||
// to save on remote calls: only webfinger if we don't have a remoteAccount yet, or if we haven't
|
||||
// fingered the remote account for at least 2 days; don't finger instance accounts
|
||||
var fingered time.Time
|
||||
if remoteAccount == nil || remoteAccount.LastWebfingeredAt.Before(time.Now().Add(webfingerInterval)) {
|
||||
if remoteAccount == nil || (remoteAccount.LastWebfingeredAt.Before(time.Now().Add(webfingerInterval)) && !instanceAccount(remoteAccount)) {
|
||||
accountDomain, params.RemoteAccountID, err = d.fingerRemoteAccount(ctx, params.RequestingUsername, params.RemoteAccountUsername, params.RemoteAccountHost)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("GetRemoteAccount: error while fingering: %s", err)
|
||||
|
|
Loading…
Reference in a new issue