fix #239, read domain

This commit is contained in:
tateisu 2023-04-30 19:07:49 +09:00
parent 41e5493afb
commit 7200c86669
1 changed files with 7 additions and 1 deletions

View File

@ -230,7 +230,13 @@ class TootInstance(parser: TootParser, src: JsonObject) {
this.invites_enabled = null
} else {
this.apDomain = src.string("uri")?.let { Host.parse(it) } ?: parser.apDomain
this.apDomain =
// mastodon /api/v2/instance
src.string("domain")?.let { Host.parse(it) }
// mastodon /api/v1/instance
?: src.string("uri")?.let { Host.parse(it) }
?: parser.apDomain
this.title = src.string("title")
val sv =