diff --git a/src/features/edit-profile/index.tsx b/src/features/edit-profile/index.tsx
index faf27797d..7d1c34a05 100644
--- a/src/features/edit-profile/index.tsx
+++ b/src/features/edit-profile/index.tsx
@@ -120,6 +120,8 @@ interface AccountCredentials {
header_description?: string;
/** GoToSocial: Enable RSS feed for public posts */
enable_rss?: boolean;
+ /** GoToSocial: whether to publicly display followers/follows. */
+ hide_collections?: boolean;
}
/** Convert an account into an update_credentials request object. */
@@ -127,7 +129,7 @@ const accountToCredentials = (account: Account): AccountCredentials => {
const hideNetwork = hidesNetwork(account);
return {
- ...(pick(account, ['discoverable', 'bot', 'display_name', 'locked', 'location', 'avatar_description', 'header_description', 'enable_rss'])),
+ ...(pick(account, ['discoverable', 'bot', 'display_name', 'locked', 'location', 'avatar_description', 'header_description', 'enable_rss', 'hide_collections'])),
note: account.source?.note ?? '',
fields_attributes: [...account.source?.fields ?? []],
stranger_notifications: account.pleroma?.notification_settings?.block_from_strangers === true,
@@ -257,10 +259,12 @@ const EditProfile: React.FC = () => {
const hide = e.target.checked;
setData(prevData => ({
...prevData,
- hide_followers: hide,
- hide_follows: hide,
- hide_followers_count: hide,
- hide_follows_count: hide,
+ ...(software === GOTOSOCIAL ? { hide_collections: hide } : {
+ hide_followers: hide,
+ hide_follows: hide,
+ hide_followers_count: hide,
+ hide_follows_count: hide,
+ }),
}));
};
@@ -372,7 +376,7 @@ const EditProfile: React.FC = () => {
hint={}
>
diff --git a/src/schemas/account.ts b/src/schemas/account.ts
index 6b02951ea..586e3e5e9 100644
--- a/src/schemas/account.ts
+++ b/src/schemas/account.ts
@@ -49,6 +49,7 @@ const baseAccountSchema = z.object({
header: z.string().url().catch(headerMissing),
header_description: z.string().catch(''),
header_static: z.string().url().optional().catch(undefined),
+ hide_collections: z.boolean().catch(false),
id: z.string(),
last_status_at: z.string().datetime().optional().catch(undefined),
local: z.boolean().catch(false),
diff --git a/src/utils/features.ts b/src/utils/features.ts
index 1fa655572..4fbfebd84 100644
--- a/src/utils/features.ts
+++ b/src/utils/features.ts
@@ -580,7 +580,10 @@ const getInstanceFeatures = (instance: Instance) => {
* Can hide follows/followers lists and counts.
* @see PATCH /api/v1/accounts/update_credentials
*/
- hideNetwork: v.software === PLEROMA,
+ hideNetwork: any([
+ v.software === PLEROMA,
+ v.software === GOTOSOCIAL,
+ ]),
/**
* Pleroma import API.