nicolium: support GoToSocial' web_include_boosts

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-10 16:28:03 +01:00
parent 50342b12a2
commit ba62a98acb
5 changed files with 27 additions and 1 deletions

View File

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

View File

@ -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
*/

View File

@ -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.

View File

@ -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",

View File

@ -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 = () => {
</ListItem>
)}
{features.accountWebIncludeBoosts && (
<ListItem
label={<FormattedMessage id='preferences.fields.web_include_boosts_label' defaultMessage='Include reposts in web view' />}
hint={<FormattedMessage id='preferences.hints.web_include_boosts' defaultMessage='Show reposts created by the account on the web view of your profile' />}
>
<Toggle
checked={data.web_include_boosts}
onChange={handleCheckboxChange('web_include_boosts')}
/>
</ListItem>
)}
{features.accountMentionPolicy && (
<ListItem
label={<FormattedMessage id='preferences.fields.mention_policy_label' defaultMessage='Accept mentions from' />}