don't error on timelining hidden status

This commit is contained in:
kim 2024-09-20 23:09:23 +01:00
commit 88ebb1538e

View file

@ -384,8 +384,9 @@ func (s *Surface) timelineStatus(
) (bool, error) {
// Ingest status into given timeline using provided function.
if inserted, err := ingest(ctx, timelineID, status); err != nil {
err = gtserror.Newf("error ingesting status %s: %w", status.ID, err)
if inserted, err := ingest(ctx, timelineID, status); err != nil &&
!errors.Is(err, statusfilter.ErrHideStatus) {
err := gtserror.Newf("error ingesting status %s: %w", status.ID, err)
return false, err
} else if !inserted {
// Nothing more to do.
@ -401,7 +402,7 @@ func (s *Surface) timelineStatus(
mutes,
)
if err != nil {
err = gtserror.Newf("error converting status %s to frontend representation: %w", status.ID, err)
err := gtserror.Newf("error converting status %s to frontend representation: %w", status.ID, err)
return true, err
}