feat: better but not perfect misskey auth support

This commit is contained in:
Sam 2023-03-25 15:54:09 +01:00
parent d9aa6e4fae
commit 75407827bc
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
6 changed files with 92 additions and 35 deletions

View file

@ -51,6 +51,10 @@ func (f FediverseApp) MastodonCompatible() bool {
return f.InstanceType == "mastodon" || f.InstanceType == "pleroma" || f.InstanceType == "akkoma" || f.InstanceType == "pixelfed"
}
func (f FediverseApp) Misskey() bool {
return f.InstanceType == "misskey" || f.InstanceType == "foundkey" || f.InstanceType == "calckey"
}
const ErrNoInstanceApp = errors.Sentinel("instance doesn't have an app")
func (db *DB) FediverseApp(ctx context.Context, instance string) (fa FediverseApp, err error) {