mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 15:42:25 -05:00
don't return on status filter errors, these are usually transient
This commit is contained in:
parent
acba53a354
commit
c6df3f610d
6 changed files with 41 additions and 49 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
statusfilter "github.com/superseriousbusiness/gotosocial/internal/filter/status"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/paging"
|
||||
)
|
||||
|
||||
|
|
@ -87,11 +88,14 @@ func (p *Processor) publicTimelineGet(
|
|||
|
||||
// Pre-filtering function,
|
||||
// i.e. filter before caching.
|
||||
func(s *gtsmodel.Status) (bool, error) {
|
||||
func(s *gtsmodel.Status) bool {
|
||||
|
||||
// Check the visibility of passed status to requesting user.
|
||||
ok, err := p.visFilter.StatusPublicTimelineable(ctx, requester, s)
|
||||
return !ok, err
|
||||
if err != nil {
|
||||
log.Errorf(ctx, "error filtering status %s: %v", s.URI, err)
|
||||
}
|
||||
return !ok
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
@ -136,11 +140,14 @@ func (p *Processor) localTimelineGet(
|
|||
|
||||
// Filtering function,
|
||||
// i.e. filter before caching.
|
||||
func(s *gtsmodel.Status) (bool, error) {
|
||||
func(s *gtsmodel.Status) bool {
|
||||
|
||||
// Check the visibility of passed status to requesting user.
|
||||
ok, err := p.visFilter.StatusPublicTimelineable(ctx, requester, s)
|
||||
return !ok, err
|
||||
if err != nil {
|
||||
log.Errorf(ctx, "error filtering status %s: %v", s.URI, err)
|
||||
}
|
||||
return !ok
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue