From ba62a98acb04de50e0eae002216f90511bfa1adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Tue, 10 Feb 2026 16:28:03 +0100 Subject: [PATCH] nicolium: support GoToSocial' web_include_boosts 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/entities/account.ts | 1 + packages/pl-api/lib/features.ts | 5 +++++ packages/pl-api/lib/params/settings.ts | 5 +++++ packages/pl-fe/src/locales/en.json | 2 ++ .../pl-fe/src/pages/settings/edit-profile.tsx | 15 ++++++++++++++- 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/pl-api/lib/entities/account.ts b/packages/pl-api/lib/entities/account.ts index 28c2e58e2..a8b220d3e 100644 --- a/packages/pl-api/lib/entities/account.ts +++ b/packages/pl-api/lib/entities/account.ts @@ -251,6 +251,7 @@ const untypedCredentialAccountSchema = v.pipe(v.any(), preprocessAccount, v.obje also_known_as_uris: v.fallback(v.optional(v.array(v.string())), undefined), status_content_type: v.fallback(v.optional(v.string()), undefined), + web_include_boosts: v.fallback(v.optional(v.boolean()), undefined), web_layout: v.fallback(v.optional(v.picklist(['microblog', 'gallery'])), undefined), web_visibility: v.fallback(v.optional(v.picklist(['public', 'unlisted', 'none'])), undefined), })), null), diff --git a/packages/pl-api/lib/features.ts b/packages/pl-api/lib/features.ts index cb3632631..efe99522d 100644 --- a/packages/pl-api/lib/features.ts +++ b/packages/pl-api/lib/features.ts @@ -324,6 +324,11 @@ const getFeatures = (instance: Instance) => { v.software === GOTOSOCIAL, ]), + /** + * @see PATCH /api/v1/accounts/update_credentials + */ + accountWebIncludeBoosts: v.software === GOTOSOCIAL && gte(v.version, '0.21.0'), + /** * @see PATCH /api/v1/accounts/update_credentials */ diff --git a/packages/pl-api/lib/params/settings.ts b/packages/pl-api/lib/params/settings.ts index b0733c8e8..28159eea2 100644 --- a/packages/pl-api/lib/params/settings.ts +++ b/packages/pl-api/lib/params/settings.ts @@ -142,6 +142,11 @@ interface UpdateCredentialsParams { * Requires features{@link Features.accountEnableRss}. */ enable_rss?: boolean; + /** + * Include boosts created by the account on the web view of the account. + * Requires features{@link Features.accountWebIncludeBoosts}. + */ + web_include_boosts?: boolean; /** * Layout to use for the web view of the account. * - `microblog`: default, classic microblog layout. diff --git a/packages/pl-fe/src/locales/en.json b/packages/pl-fe/src/locales/en.json index 3f52907b5..709a51415 100644 --- a/packages/pl-fe/src/locales/en.json +++ b/packages/pl-fe/src/locales/en.json @@ -1486,11 +1486,13 @@ "preferences.fields.theme_reset": "Reset theme", "preferences.fields.underline_links_label": "Always underline links in posts", "preferences.fields.unfollow_modal_label": "Show confirmation dialog before unfollowing someone", + "preferences.fields.web_include_boosts_label": "Include reposts in web view", "preferences.fields.web_layout_label": "Layout of the web view of your profile", "preferences.fields.web_visibility_label": "Visibility level of posts displayed on your profile", "preferences.fields.wrench_label": "Display wrench reaction button", "preferences.hints.demetricator": "Decrease social media anxiety by hiding all numbers from the site.", "preferences.hints.mention_policy": "Applies to direct messages and public posts", + "preferences.hints.web_include_boosts": "Show reposts created by the account on the web view of your profile", "preferences.notifications.advanced": "Show all notification categories", "preferences.options.brand_color": "Base color", "preferences.options.content_type_html": "HTML", diff --git a/packages/pl-fe/src/pages/settings/edit-profile.tsx b/packages/pl-fe/src/pages/settings/edit-profile.tsx index bd8b33888..fdf15d645 100644 --- a/packages/pl-fe/src/pages/settings/edit-profile.tsx +++ b/packages/pl-fe/src/pages/settings/edit-profile.tsx @@ -133,6 +133,7 @@ interface AccountCredentials { speak_as_cat?: boolean; /** Mention policy */ mention_policy?: UpdateCredentialsParams['mention_policy']; + web_include_boosts?: boolean; web_layout?: UpdateCredentialsParams['web_layout']; web_visibility?: UpdateCredentialsParams['web_visibility']; custom_css?: string; @@ -144,7 +145,7 @@ const accountToCredentials = (account: CredentialAccount): AccountCredentials => return { ...(pick(account, ['birthday', 'bot', 'custom_css', 'discoverable', 'display_name', 'locked', 'location', 'avatar_description', 'header_description', 'enable_rss', 'hide_collections', 'is_cat', 'speak_as_cat', 'mention_policy'])), - ...(pick(account.source, ['note', 'web_layout', 'web_visibility'])), + ...(pick(account.source, ['note', 'web_include_boosts', 'web_layout', 'web_visibility'])), fields_attributes: [...account.__meta.source?.fields ?? []], stranger_notifications: account.__meta.pleroma?.notification_settings?.block_from_strangers === true, hide_followers: hideNetwork, @@ -527,6 +528,18 @@ const EditProfilePage: React.FC = () => { )} + {features.accountWebIncludeBoosts && ( + } + hint={} + > + + + )} + {features.accountMentionPolicy && ( }