fix(backend): recognise firefish as misskey and hometown as mastodon

This commit is contained in:
sam 2023-07-30 21:33:16 +02:00
parent ca138efc8f
commit bbd7623855
No known key found for this signature in database
GPG key ID: B4EF20DDE721CAA1
2 changed files with 4 additions and 3 deletions

View file

@ -52,7 +52,7 @@ func (f FediverseApp) MastodonCompatible() bool {
} }
func (f FediverseApp) Misskey() 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") const ErrNoInstanceApp = errors.Sentinel("instance doesn't have an app")

View file

@ -65,11 +65,12 @@ func (s *Server) noAppFediverseURL(ctx context.Context, w http.ResponseWriter, r
} }
switch softwareName { switch softwareName {
case "misskey", "foundkey", "calckey": case "misskey", "foundkey", "calckey", "firefish":
return s.noAppMisskeyURL(ctx, w, r, softwareName, instance) return s.noAppMisskeyURL(ctx, w, r, softwareName, instance)
case "mastodon", "pleroma", "akkoma", "pixelfed", "gotosocial": case "mastodon", "pleroma", "akkoma", "pixelfed", "gotosocial":
case "glitchcafe": case "glitchcafe", "hometown":
// plural.cafe (potentially other instances too?) runs Mastodon but changes the software name // 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 // changing it back to mastodon here for consistency
softwareName = "mastodon" softwareName = "mastodon"
default: default: