improve #239, read contact.email
This commit is contained in:
parent
2b1c5878c0
commit
8494bcf0d9
@ -233,7 +233,11 @@ class TootInstance(parser: TootParser, src: JsonObject) {
|
||||
this.apDomain = src.string("uri")?.let { Host.parse(it) } ?: parser.apDomain
|
||||
this.title = src.string("title")
|
||||
|
||||
val sv = src.string("email")
|
||||
val sv =
|
||||
// mastodon /api/v2/instance
|
||||
src.jsonObject("contact")?.string("email")
|
||||
// mastodon /api/v1/instance
|
||||
?: src.string("email")
|
||||
this.email = when {
|
||||
sv?.startsWith("mailto:") == true -> sv.substring(7)
|
||||
else -> sv
|
||||
|
Loading…
x
Reference in New Issue
Block a user