From bbd7623855f9eec2ab7df83f0da4b5cfd7843dc7 Mon Sep 17 00:00:00 2001 From: sam Date: Sun, 30 Jul 2023 21:33:16 +0200 Subject: [PATCH] fix(backend): recognise firefish as misskey and hometown as mastodon --- backend/db/fediverse.go | 2 +- backend/routes/auth/fediverse.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/db/fediverse.go b/backend/db/fediverse.go index eeadd79..2918d8c 100644 --- a/backend/db/fediverse.go +++ b/backend/db/fediverse.go @@ -52,7 +52,7 @@ func (f FediverseApp) MastodonCompatible() bool { } func (f FediverseApp) Misskey() bool { - return f.InstanceType == "misskey" || f.InstanceType == "foundkey" || f.InstanceType == "calckey" + return f.InstanceType == "misskey" || f.InstanceType == "foundkey" || f.InstanceType == "calckey" || f.InstanceType == "firefish" } const ErrNoInstanceApp = errors.Sentinel("instance doesn't have an app") diff --git a/backend/routes/auth/fediverse.go b/backend/routes/auth/fediverse.go index b3f2f62..39b124a 100644 --- a/backend/routes/auth/fediverse.go +++ b/backend/routes/auth/fediverse.go @@ -65,11 +65,12 @@ func (s *Server) noAppFediverseURL(ctx context.Context, w http.ResponseWriter, r } switch softwareName { - case "misskey", "foundkey", "calckey": + case "misskey", "foundkey", "calckey", "firefish": return s.noAppMisskeyURL(ctx, w, r, softwareName, instance) case "mastodon", "pleroma", "akkoma", "pixelfed", "gotosocial": - case "glitchcafe": + case "glitchcafe", "hometown": // plural.cafe (potentially other instances too?) runs Mastodon but changes the software name + // Hometown is a lightweight fork of Mastodon so we can just treat it the same // changing it back to mastodon here for consistency softwareName = "mastodon" default: