mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-17 21:31:57 +01:00
Refactor proxyTag function names
This commit is contained in:
parent
1f9aeddb57
commit
4a4f03c12b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user