Fixes NIP-22 identifier for geotags
This commit is contained in:
@@ -74,6 +74,14 @@ class CommentEvent(
|
||||
|
||||
fun replyAuthors() = tags.filter(ReplyAuthorTag::match)
|
||||
|
||||
fun rootAuthorKeys() = tags.mapNotNull(RootAuthorTag::parseKey)
|
||||
|
||||
fun replyAuthorKeys() = tags.mapNotNull(ReplyAuthorTag::parseKey)
|
||||
|
||||
fun rootAuthorHints() = tags.mapNotNull(RootAuthorTag::parseAsHint)
|
||||
|
||||
fun replyAuthorHints() = tags.mapNotNull(ReplyAuthorTag::parseAsHint)
|
||||
|
||||
fun rootScopes() = tags.filter { RootIdentifierTag.match(it) || RootAddressTag.match(it) || RootEventTag.match(it) }
|
||||
|
||||
fun rootKinds() = tags.filter(RootKindTag::match)
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ class RootIdentifierTag {
|
||||
@JvmStatic
|
||||
fun assemble(id: ExternalId): List<Array<String>> =
|
||||
when (id) {
|
||||
is GeohashId -> GeoHashTag.geoMipMap(id.geohash).map { assemble(it, id.hint) }
|
||||
is GeohashId -> GeoHashTag.geoMipMap(id.geohash).map { assemble(GeohashId.toScope(it), id.hint) }
|
||||
else -> listOf(assemble(id.toScope(), id.hint()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user