summaryrefslogtreecommitdiff
path: root/internal/filter/visibility
diff options
context:
space:
mode:
Diffstat (limited to 'internal/filter/visibility')
-rw-r--r--internal/filter/visibility/home_timeline.go23
-rw-r--r--internal/filter/visibility/status.go3
2 files changed, 17 insertions, 9 deletions
diff --git a/internal/filter/visibility/home_timeline.go b/internal/filter/visibility/home_timeline.go
index 03a3b62c3..fbb6ea3da 100644
--- a/internal/filter/visibility/home_timeline.go
+++ b/internal/filter/visibility/home_timeline.go
@@ -161,15 +161,22 @@ func (f *Filter) isStatusHomeTimelineable(ctx context.Context, owner *gtsmodel.A
return false, cache.SentinelError
}
- // Fetch next parent in conversation.
- inReplyToID := next.InReplyToID
- next, err = f.state.DB.GetStatusByID(
- gtscontext.SetBarebones(ctx),
- inReplyToID,
- )
- if err != nil {
- return false, gtserror.Newf("error getting status parent %s: %w", inReplyToID, err)
+ // Check if parent is set.
+ inReplyTo := next.InReplyTo
+ if inReplyTo == nil {
+
+ // Fetch next parent in conversation.
+ inReplyTo, err = f.state.DB.GetStatusByID(
+ gtscontext.SetBarebones(ctx),
+ next.InReplyToID,
+ )
+ if err != nil {
+ return false, gtserror.Newf("error getting status parent %s: %w", next.InReplyToURI, err)
+ }
}
+
+ // Set next status.
+ next = inReplyTo
}
if next != status && !oneAuthor && !visible {
diff --git a/internal/filter/visibility/status.go b/internal/filter/visibility/status.go
index 6edb32ec0..24fa6f2e6 100644
--- a/internal/filter/visibility/status.go
+++ b/internal/filter/visibility/status.go
@@ -316,7 +316,8 @@ func (f *Filter) areStatusAccountsVisible(ctx context.Context, requester *gtsmod
// This is a boosted status.
if status.AccountID == status.BoostOfAccountID {
- // Some clout-chaser boosted their own status, tch.
+ // Some clout-chaser boosted
+ // their own status, tch.
return true, nil
}