Refactor proxyTag function names
This commit is contained in:
@@ -22,8 +22,8 @@ package com.vitorpamplona.quartz.nip48ProxyTags
|
||||
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
|
||||
fun Event.taggedProxies() = tags.taggedProxies()
|
||||
fun Event.taggedProxies() = tags.proxies()
|
||||
|
||||
fun Event.firstTaggedProxy() = tags.firstTaggedProxy()
|
||||
fun Event.firstTaggedProxy() = tags.firstProxy()
|
||||
|
||||
fun Event.hasAnyTaggedProxy() = tags.hasAnyTaggedProxy()
|
||||
fun Event.hasTaggedProxy() = tags.hasProxy()
|
||||
|
||||
@@ -31,3 +31,5 @@ fun TagArrayBuilder.proxy(
|
||||
id: String,
|
||||
pt: String,
|
||||
) = add(ProxyTag.assemble(id, pt))
|
||||
|
||||
fun TagArrayBuilder.proxy(tag: ProxyTag) = add(tag.toTagArray())
|
||||
|
||||
@@ -25,8 +25,8 @@ import com.vitorpamplona.quartz.nip01Core.core.firstTagValue
|
||||
import com.vitorpamplona.quartz.nip01Core.core.hasTagWithContent
|
||||
import com.vitorpamplona.quartz.nip01Core.core.mapValues
|
||||
|
||||
fun TagArray.taggedProxies() = this.mapValues(ProxyTag.TAG_NAME)
|
||||
fun TagArray.proxies() = this.mapValues(ProxyTag.TAG_NAME)
|
||||
|
||||
fun TagArray.firstTaggedProxy() = this.firstTagValue(ProxyTag.TAG_NAME)
|
||||
fun TagArray.firstProxy() = this.firstTagValue(ProxyTag.TAG_NAME)
|
||||
|
||||
fun TagArray.hasAnyTaggedProxy() = this.hasTagWithContent(ProxyTag.TAG_NAME)
|
||||
fun TagArray.hasProxy() = this.hasTagWithContent(ProxyTag.TAG_NAME)
|
||||
|
||||
Reference in New Issue
Block a user