From fb2ef90ec51c47c801d290f2f6ff2289121cbeb1 Mon Sep 17 00:00:00 2001 From: nicole mikołajczyk Date: Wed, 13 Aug 2025 13:23:42 +0200 Subject: [feature] support blur filter action (#4371) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This pull request implements the `blur` value of `filter_action` for status filtering. It was introduced by Mastodon 4.4.0. [Related docs update](https://github.com/mastodon/documentation/pull/1620) Signed-off-by: nicole mikołajczyk Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4371 Reviewed-by: kim Co-authored-by: nicole mikołajczyk Co-committed-by: nicole mikołajczyk --- internal/validate/formvalidation.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'internal/validate/formvalidation.go') diff --git a/internal/validate/formvalidation.go b/internal/validate/formvalidation.go index 42c231491..ce4d6c292 100644 --- a/internal/validate/formvalidation.go +++ b/internal/validate/formvalidation.go @@ -383,14 +383,16 @@ func FilterContexts(contexts []apimodel.FilterContext) error { func FilterAction(action apimodel.FilterAction) error { switch action { case apimodel.FilterActionWarn, - apimodel.FilterActionHide: + apimodel.FilterActionHide, + apimodel.FilterActionBlur: return nil } return fmt.Errorf( - "filter action '%s' was not recognized, valid options are '%s', '%s'", + "filter action '%s' was not recognized, valid options are '%s', '%s', '%s'", action, apimodel.FilterActionWarn, apimodel.FilterActionHide, + apimodel.FilterActionBlur, ) } -- cgit v1.2.3