pl-api: add feature definition for blur media filter

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-08-11 11:39:04 +02:00
parent aa5bbce5d0
commit fb883eacc2
2 changed files with 4 additions and 2 deletions

View File

@ -878,6 +878,8 @@ const getFeatures = (instance: Instance) => {
v.software === MASTODON, v.software === MASTODON,
]), ]),
filtersV2BlurAction: v.software === MASTODON && gte(v.version, '4.4.0'),
/** /**
* Allows setting the focal point of a media attachment. * Allows setting the focal point of a media attachment.
* @see {@link https://docs.joinmastodon.org/methods/media/} * @see {@link https://docs.joinmastodon.org/methods/media/}

View File

@ -36,7 +36,7 @@ type FilterContext = 'home' | 'notifications' | 'public' | 'thread' | 'account';
interface CreateFilterParams { interface CreateFilterParams {
title: string; title: string;
context: Array<FilterContext>; context: Array<FilterContext>;
filter_action?: 'warn' | 'hide'; filter_action?: 'warn' | 'hide' | 'blur';
expires_in?: number; expires_in?: number;
keywords_attributes: Array<{ keywords_attributes: Array<{
keyword: string; keyword: string;
@ -50,7 +50,7 @@ interface CreateFilterParams {
interface UpdateFilterParams { interface UpdateFilterParams {
title?: string; title?: string;
context?: Array<FilterContext>; context?: Array<FilterContext>;
filter_action?: 'warn' | 'hide'; filter_action?: 'warn' | 'hide' | 'blur';
expires_in?: number; expires_in?: number;
keywords_attributes?: Array<{ keywords_attributes?: Array<{
keyword: string; keyword: string;