Use lowercase versions of user name and retrieved json to make case insensitive match
This commit is contained in:
@@ -76,13 +76,13 @@ class Nip05Verifier() {
|
|||||||
nip05,
|
nip05,
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
val nip05url = try {
|
val nip05url = try {
|
||||||
mapper.readTree(it)
|
mapper.readTree(it.lowercase())
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
onError("Error Parsing JSON from Lightning Address. Check the user's lightning setup")
|
onError("Error Parsing JSON from Lightning Address. Check the user's lightning setup")
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
val user = nip05.split("@")[0]
|
val user = nip05.split("@")[0].lowercase()
|
||||||
|
|
||||||
val hexKey = nip05url?.get("names")?.get(user)?.asText()
|
val hexKey = nip05url?.get("names")?.get(user)?.asText()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user