[chore] move status filtering from type converter (#4306)

This finalizes the moving status filtering out of the type converter, and into its own `./internal/filter/` subpkg :)

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4306
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
kim 2025-07-04 15:30:39 +02:00 committed by kim
commit 66e1ec14aa
38 changed files with 565 additions and 846 deletions

View file

@ -212,7 +212,6 @@ func (suite *FromClientAPITestSuite) statusJSON(
ctx,
status,
requestingAccount,
gtsmodel.FilterContextNone,
)
if err != nil {
suite.FailNow(err.Error())
@ -236,7 +235,6 @@ func (suite *FromClientAPITestSuite) conversationJSON(
ctx,
conversation,
requestingAccount,
nil,
)
if err != nil {
suite.FailNow(err.Error())
@ -344,7 +342,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithNotification() {
suite.FailNow("timed out waiting for new status notification")
}
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false)
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif)
if err != nil {
suite.FailNow(err.Error())
}
@ -2031,7 +2029,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithAuthorOnExclusiv
suite.FailNow("timed out waiting for new status notification")
}
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false)
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif)
if err != nil {
suite.FailNow(err.Error())
}
@ -2216,7 +2214,7 @@ func (suite *FromClientAPITestSuite) TestProcessUpdateStatusInteractedWith() {
suite.FailNow("timed out waiting for edited status notification")
}
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false)
apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif)
if err != nil {
suite.FailNow(err.Error())
}