From c6e5f746daa2f94c170e0a18b3fa7582a5e13e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 3 Jan 2023 23:42:15 +0100 Subject: [PATCH] =?UTF-8?q?Update=20features.ts=20for=20Takah=C4=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/normalizers/instance.ts | 2 +- app/soapbox/utils/features.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/soapbox/normalizers/instance.ts b/app/soapbox/normalizers/instance.ts index 48214b091..35d419392 100644 --- a/app/soapbox/normalizers/instance.ts +++ b/app/soapbox/normalizers/instance.ts @@ -112,7 +112,7 @@ const fixAkkoma = (instance: ImmutableMap) => { } }; -/** Set Takahe version to a Pleroma-like string */ +/** Set Takahē version to a Pleroma-like string */ const fixTakahe = (instance: ImmutableMap) => { const version: string = instance.get('version', ''); diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index 42947f340..44b0d4273 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -123,6 +123,7 @@ const getInstanceFeatures = (instance: Instance) => { accountLookup: any([ v.software === MASTODON && gte(v.compatVersion, '3.4.0'), v.software === PLEROMA && gte(v.version, '2.4.50'), + v.software === TAKAHE && gte(v.version, '0.6.1'), v.software === TRUTHSOCIAL, ]), @@ -386,6 +387,7 @@ const getInstanceFeatures = (instance: Instance) => { /** Whether the accounts who favourited or emoji-reacted to a status can be viewed through the API. */ exposableReactions: any([ v.software === MASTODON, + v.software === TAKAHE && gte(v.version, '0.6.1'), v.software === TRUTHSOCIAL, features.includes('exposable_reactions'), ]), @@ -394,7 +396,10 @@ const getInstanceFeatures = (instance: Instance) => { * Can see accounts' followers you know * @see GET /api/v1/accounts/familiar_followers */ - familiarFollowers: v.software === MASTODON && gte(v.version, '3.5.0'), + familiarFollowers: any([ + v.software === MASTODON && gte(v.version, '3.5.0'), + v.software === TAKAHE, + ]), /** Whether the instance federates. */ federating: federation.get('enabled', true) === true, // Assume true unless explicitly false @@ -524,6 +529,7 @@ const getInstanceFeatures = (instance: Instance) => { notificationsIncludeTypes: any([ v.software === MASTODON && gte(v.compatVersion, '3.5.0'), v.software === PLEROMA && gte(v.version, '2.4.50'), + v.software === TAKAHE && gte(v.version, '0.6.2'), ]), /**