summaryrefslogtreecommitdiff
path: root/internal/timeline/prepare.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/timeline/prepare.go')
-rw-r--r--internal/timeline/prepare.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/timeline/prepare.go b/internal/timeline/prepare.go
index 07bde79fa..ec595ce42 100644
--- a/internal/timeline/prepare.go
+++ b/internal/timeline/prepare.go
@@ -24,6 +24,7 @@ import (
"codeberg.org/gruf/go-kv"
"github.com/superseriousbusiness/gotosocial/internal/db"
+ statusfilter "github.com/superseriousbusiness/gotosocial/internal/filter/status"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/log"
)
@@ -121,6 +122,12 @@ func (t *timeline) prepareXBetweenIDs(ctx context.Context, amount int, behindID
for e, entry := range toPrepare {
prepared, err := t.prepareFunction(ctx, t.timelineID, entry.itemID)
if err != nil {
+ if errors.Is(err, statusfilter.ErrHideStatus) {
+ // This item has been filtered out by the requesting user's filters.
+ // Remove it and skip past it.
+ t.items.data.Remove(e)
+ continue
+ }
if errors.Is(err, db.ErrNoEntries) {
// ErrNoEntries means something has been deleted,
// so we'll likely not be able to ever prepare this.