[feature] support blur filter action (#4371)

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 <git@mkljczk.pl>
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4371
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk 2025-08-13 13:23:42 +02:00 committed by kim
commit fb2ef90ec5
7 changed files with 20 additions and 4 deletions

View file

@ -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))
}