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/gtsmodel/filter.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/gtsmodel/filter.go') diff --git a/internal/gtsmodel/filter.go b/internal/gtsmodel/filter.go index 1d457d878..522456b39 100644 --- a/internal/gtsmodel/filter.go +++ b/internal/gtsmodel/filter.go @@ -205,6 +205,10 @@ const ( // FilterActionHide means that the status should // be removed from timeline results entirely. FilterActionHide FilterAction = 2 + + // FilterActionWarn means that the status should + // be shown with its media attachments hidden/blurred. + FilterActionBlur FilterAction = 3 ) // String returns human-readable form of FilterAction. @@ -216,6 +220,8 @@ func (act FilterAction) String() string { return "warn" case FilterActionHide: return "hide" + case FilterActionBlur: + return "blur" default: panic(fmt.Sprintf("invalid filter action: %d", act)) } -- cgit v1.2.3