From 0f2de6394a1c52d47e326bb7d7d129a217ae4f6f Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 10 Aug 2021 13:32:39 +0200 Subject: Dereference remote replies (#132) * decided where to put reply dereferencing * fiddling with dereferencing threads * further adventures * tidy up some stuff * move dereferencing functionality * a bunch of refactoring * go fmt * more refactoring * bleep bloop * docs and linting * start implementing replies collection on gts side * fiddling around * allow dereferencing our replies * lint, fmt --- internal/db/db.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/db/db.go') diff --git a/internal/db/db.go b/internal/db/db.go index c764cc716..d0b23fbc6 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -218,10 +218,14 @@ type DB interface { GetFaveCountForStatus(status *gtsmodel.Status) (int, error) // StatusParents get the parent statuses of a given status. - StatusParents(status *gtsmodel.Status) ([]*gtsmodel.Status, error) + // + // If onlyDirect is true, only the immediate parent will be returned. + StatusParents(status *gtsmodel.Status, onlyDirect bool) ([]*gtsmodel.Status, error) // StatusChildren gets the child statuses of a given status. - StatusChildren(status *gtsmodel.Status) ([]*gtsmodel.Status, error) + // + // If onlyDirect is true, only the immediate children will be returned. + StatusChildren(status *gtsmodel.Status, onlyDirect bool, minID string) ([]*gtsmodel.Status, error) // StatusFavedBy checks if a given status has been faved by a given account ID StatusFavedBy(status *gtsmodel.Status, accountID string) (bool, error) -- cgit v1.2.3