From 3bbfc716addf2ef2df62082279bd28224eddb7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 11 Jan 2023 14:18:05 +0100 Subject: [PATCH] Support Wildebeest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/utils/features.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index d224502ff..a4076c69a 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -70,6 +70,11 @@ export const AKKOMA = 'akkoma'; */ export const TAKAHE = 'Takahe'; +/** + * Wildebeest, backend running on top of Cloudflare Pages. + */ +export const WILDEBEEST = 'Wildebeest'; + /** Parse features for the given instance */ const getInstanceFeatures = (instance: Instance) => { const v = parseVersion(instance.version); @@ -304,12 +309,17 @@ const getInstanceFeatures = (instance: Instance) => { v.software === PLEROMA && gte(v.version, '0.9.9'), ]), + /** + * Ability to edit profile information. + * @see PATCH /api/v1/accounts/update_credentials + */ editProfile: any([ v.software === MASTODON, v.software === MITRA, v.software === PIXELFED, v.software === PLEROMA, v.software === TRUTHSOCIAL, + v.software === WILDEBEEST, ]), editStatuses: any([ @@ -490,6 +500,7 @@ const getInstanceFeatures = (instance: Instance) => { */ mediaV2: any([ v.software === MASTODON && gte(v.compatVersion, '3.1.3'), + v.software === WILDEBEEST, // Even though Pleroma supports these endpoints, it has disadvantages // v.software === PLEROMA && gte(v.version, '2.1.0'), ]), @@ -593,6 +604,7 @@ const getInstanceFeatures = (instance: Instance) => { v.software === MASTODON, v.software === PLEROMA, v.software === TAKAHE, + v.software === WILDEBEEST, ]), /**