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/dereference.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/federation/dereference.go') diff --git a/internal/federation/dereference.go b/internal/federation/dereference.go index 705cdbd19..6095a4d52 100644 --- a/internal/federation/dereference.go +++ b/internal/federation/dereference.go @@ -39,8 +39,8 @@ func (f *federator) EnrichRemoteStatus(ctx context.Context, username string, sta return f.dereferencer.EnrichRemoteStatus(ctx, username, status, includeParent) } -func (f *federator) DereferenceRemoteThread(ctx context.Context, username string, statusIRI *url.URL) error { - return f.dereferencer.DereferenceThread(ctx, username, statusIRI) +func (f *federator) DereferenceRemoteThread(ctx context.Context, username string, statusIRI *url.URL, status *gtsmodel.Status, statusable ap.Statusable) { + f.dereferencer.DereferenceThread(ctx, username, statusIRI, status, statusable) } func (f *federator) GetRemoteInstance(ctx context.Context, username string, remoteInstanceURI *url.URL) (*gtsmodel.Instance, error) { -- cgit v1.2.3