From 7a1aa04bbbc9f95442c8850ef61d1d58bb12df74 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sun, 25 Sep 2022 12:09:41 +0100 Subject: [bugfix] update thread iterators to not use recursion (#851) * update thread iterators to not use recursion, rewrote both Signed-off-by: kim * fix endless descendant deref, don't error if fetching existing status Signed-off-by: kim * don't refetch remote ancestor statuses, improve descendant iter commenting Signed-off-by: kim * move collection page next logic so we capture first page of entities Signed-off-by: kim * improve log format argument quoting Signed-off-by: kim * improve code commenting of collection paging Signed-off-by: kim * only dereference announce's originating status if _not_ local. update DereferenceThread() signature. cleanup searchStatusByURI() Signed-off-by: kim Signed-off-by: kim --- internal/federation/federator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/federation/federator.go') diff --git a/internal/federation/federator.go b/internal/federation/federator.go index 2f0606338..0b09144c2 100644 --- a/internal/federation/federator.go +++ b/internal/federation/federator.go @@ -53,7 +53,7 @@ type Federator interface { // If something goes wrong during authentication, nil, false, and an error will be returned. AuthenticateFederatedRequest(ctx context.Context, username string) (*url.URL, gtserror.WithCode) - DereferenceRemoteThread(ctx context.Context, username string, statusURI *url.URL) error + DereferenceRemoteThread(ctx context.Context, username string, statusURI *url.URL, status *gtsmodel.Status, statusable ap.Statusable) DereferenceAnnounce(ctx context.Context, announce *gtsmodel.Status, requestingUsername string) error GetRemoteAccount(ctx context.Context, params dereferencing.GetRemoteAccountParams) (*gtsmodel.Account, error) -- cgit v1.2.3