From e17691df430d82d30815f5ae9173df5b2c995a29 Mon Sep 17 00:00:00 2001 From: April John Date: Mon, 4 Sep 2023 17:01:12 +0200 Subject: [PATCH] [MastodonAPI] add Pleroma stuff to api/v1/instance Pleroma has custom fields which we added to allow compatibility with AkkomaFE Co-authored-by: Legion Orsetti --- .../src/server/api/mastodon/endpoints/meta.ts | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/meta.ts b/packages/backend/src/server/api/mastodon/endpoints/meta.ts index a5ab81bf1..112daf1d2 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/meta.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/meta.ts @@ -37,7 +37,41 @@ export async function getInstance( languages: meta.langs, registrations: !meta.disableRegistration || response.registrations, approval_required: !response.registrations, - invites_enabled: response.registrations, + invites_enabled: response.registrations, + pleroma : { + metadata: { + account_activation_required: !response.registrations, + birthday_min_age: 0, + birthday_required: false, + features: [ + "mastodon_api", + "mastodon_api_float", + "polls", + "relay", + "quote_posting", + "pleroma_emoji_reactions", + "pleroma_chat_messages", + "exposable_reactions", + "profile_directory" + ], + federation: { + enabled : true + }, + fields_limits: { + max_fields: 10, + max_remote_fields: 20, + name_length: 512, + value_length: 2048 + }, + post_formats: [ + "text/x.misskeymarkdown" + ] + }, + stats: { + mau: 1, + }, + vapid_public_key: meta.swPublicKey ? meta.swPublicKey : "", + }, configuration: { accounts: { max_featured_tags: 20,