summaryrefslogtreecommitdiff
path: root/internal/db/db.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-08-10 13:32:39 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-10 13:32:39 +0200
commit0f2de6394a1c52d47e326bb7d7d129a217ae4f6f (patch)
treee2709bdbbbbcf5e12d6da62b653b67f1789ab1c5 /internal/db/db.go
parentFrodo swaggins (#126) (diff)
downloadgotosocial-0f2de6394a1c52d47e326bb7d7d129a217ae4f6f.tar.xz
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
Diffstat (limited to 'internal/db/db.go')
-rw-r--r--internal/db/db.go8
1 files changed, 6 insertions, 2 deletions
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)