mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-06-20 20:00:55 +02:00
Allows the choice of limits on Count
This commit is contained in:
parent
a739329ab8
commit
5ee754c71a
@ -38,10 +38,11 @@ class CountCmd(
|
|||||||
fun toJson(
|
fun toJson(
|
||||||
requestId: String,
|
requestId: String,
|
||||||
filters: List<Filter>,
|
filters: List<Filter>,
|
||||||
|
limit: Int = 19,
|
||||||
): String =
|
): String =
|
||||||
filters.joinToStringLimited(
|
filters.joinToStringLimited(
|
||||||
separator = ",",
|
separator = ",",
|
||||||
limit = 19,
|
limit = limit,
|
||||||
prefix = """["COUNT","$requestId",""",
|
prefix = """["COUNT","$requestId",""",
|
||||||
postfix = "]",
|
postfix = "]",
|
||||||
) {
|
) {
|
||||||
|
@ -31,9 +31,7 @@ class ToRelayParser {
|
|||||||
CloseCmd.LABEL -> CloseCmd.parse(msgArray)
|
CloseCmd.LABEL -> CloseCmd.parse(msgArray)
|
||||||
CountCmd.LABEL -> CountCmd.parse(msgArray)
|
CountCmd.LABEL -> CountCmd.parse(msgArray)
|
||||||
EventCmd.LABEL -> EventCmd.parse(msgArray)
|
EventCmd.LABEL -> EventCmd.parse(msgArray)
|
||||||
com.vitorpamplona.quartz.nip01Core.relays.commands.toRelay.ReqCmd.LABEL ->
|
ReqCmd.LABEL -> ReqCmd.parse(msgArray)
|
||||||
com.vitorpamplona.quartz.nip01Core.relays.commands.toRelay.ReqCmd
|
|
||||||
.parse(msgArray)
|
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user