From 3756d64ac71fcb12eacd611dd10a91552764c753 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 20 Sep 2024 23:28:02 +0100 Subject: [PATCH] further code to ignore statusfilter.ErrHideStatus type errors --- internal/processing/workers/surfacetimeline.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/internal/processing/workers/surfacetimeline.go b/internal/processing/workers/surfacetimeline.go index 1c3746885..b071bd72e 100644 --- a/internal/processing/workers/surfacetimeline.go +++ b/internal/processing/workers/surfacetimeline.go @@ -401,15 +401,19 @@ func (s *Surface) timelineStatus( filters, mutes, ) - if err != nil { + if err != nil && !errors.Is(err, statusfilter.ErrHideStatus) { err := gtserror.Newf("error converting status %s to frontend representation: %w", status.ID, err) return true, err } - // The status was inserted so stream it to the user. - s.Stream.Update(ctx, account, apiStatus, streamType) + if apiStatus != nil { + // The status was inserted so stream it to the user. + s.Stream.Update(ctx, account, apiStatus, streamType) + return true, nil + } - return true, nil + // Status was hidden. + return false, nil } // timelineAndNotifyStatusForTagFollowers inserts the status into the