diff options
| author | 2025-07-01 16:00:04 +0200 | |
|---|---|---|
| committer | 2025-07-01 16:00:04 +0200 | |
| commit | 4f2aa792b33fdd5fb4b22dec813b3668d7190522 (patch) | |
| tree | 1148a9322d04bf43c1c159df3079fb1790c5c154 /internal/processing/workers/fromclientapi_test.go | |
| parent | [chore] update go dependencies (#4304) (diff) | |
| download | gotosocial-4f2aa792b33fdd5fb4b22dec813b3668d7190522.tar.xz | |
[performance] add statusfilter cache to cache calculated status filtering results (#4303)
this adds another 'filter' type cache, similar to the visibility and mute caches, to cache the results of status filtering checks. for the moment this keeps all the check calls themselves within the frontend typeconversion code, but i may move this out of the typeconverter in a future PR (also removing the ErrHideStatus means of propagating a hidden status).
also tweaks some of the cache invalidation hooks to not make unnecessary calls.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4303
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/workers/fromclientapi_test.go')
| -rw-r--r-- | internal/processing/workers/fromclientapi_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/processing/workers/fromclientapi_test.go b/internal/processing/workers/fromclientapi_test.go index 1c30c11be..4453095fd 100644 --- a/internal/processing/workers/fromclientapi_test.go +++ b/internal/processing/workers/fromclientapi_test.go @@ -213,7 +213,6 @@ func (suite *FromClientAPITestSuite) statusJSON( status, requestingAccount, gtsmodel.FilterContextNone, - nil, ) if err != nil { suite.FailNow(err.Error()) @@ -345,7 +344,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithNotification() { suite.FailNow("timed out waiting for new status notification") } - apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, nil) + apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false) if err != nil { suite.FailNow(err.Error()) } @@ -2032,7 +2031,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithAuthorOnExclusiv suite.FailNow("timed out waiting for new status notification") } - apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, nil) + apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false) if err != nil { suite.FailNow(err.Error()) } @@ -2217,7 +2216,7 @@ func (suite *FromClientAPITestSuite) TestProcessUpdateStatusInteractedWith() { suite.FailNow("timed out waiting for edited status notification") } - apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, nil) + apiNotif, err := testStructs.TypeConverter.NotificationToAPINotification(ctx, notif, false) if err != nil { suite.FailNow(err.Error()) } |
