From fb883eacc2b43980c55a00f877ab6e0dc93cc22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Mon, 11 Aug 2025 11:39:04 +0200 Subject: [PATCH] pl-api: add feature definition for blur media filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-api/lib/features.ts | 2 ++ packages/pl-api/lib/params/filtering.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/pl-api/lib/features.ts b/packages/pl-api/lib/features.ts index fea3e7a2a..d2d185e7c 100644 --- a/packages/pl-api/lib/features.ts +++ b/packages/pl-api/lib/features.ts @@ -878,6 +878,8 @@ const getFeatures = (instance: Instance) => { v.software === MASTODON, ]), + filtersV2BlurAction: v.software === MASTODON && gte(v.version, '4.4.0'), + /** * Allows setting the focal point of a media attachment. * @see {@link https://docs.joinmastodon.org/methods/media/} diff --git a/packages/pl-api/lib/params/filtering.ts b/packages/pl-api/lib/params/filtering.ts index 3fa4e1bfa..599a1eab9 100644 --- a/packages/pl-api/lib/params/filtering.ts +++ b/packages/pl-api/lib/params/filtering.ts @@ -36,7 +36,7 @@ type FilterContext = 'home' | 'notifications' | 'public' | 'thread' | 'account'; interface CreateFilterParams { title: string; context: Array; - filter_action?: 'warn' | 'hide'; + filter_action?: 'warn' | 'hide' | 'blur'; expires_in?: number; keywords_attributes: Array<{ keyword: string; @@ -50,7 +50,7 @@ interface CreateFilterParams { interface UpdateFilterParams { title?: string; context?: Array; - filter_action?: 'warn' | 'hide'; + filter_action?: 'warn' | 'hide' | 'blur'; expires_in?: number; keywords_attributes?: Array<{ keyword: string;