Skip to content

Commit

Permalink
Merge pull request #1252 from greenart7c3/main
Browse files Browse the repository at this point in the history
Add some missing functions to NostrClient
  • Loading branch information
vitorpamplona authored Jan 5, 2025
2 parents 9816577 + eb93664 commit 879f70f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class NostrClient(

fun buildRelay(it: RelaySetupInfoToConnect): Relay = Relay(it.url, it.read, it.write, it.forceProxy, it.feedTypes, websocketBuilder, subscriptions)

fun getRelay(url: String): Relay? = relayPool.getRelay(url)

@Synchronized
fun reconnect(
relays: Array<RelaySetupInfoToConnect>?,
Expand Down Expand Up @@ -228,6 +230,8 @@ class NostrClient(
return result
}

fun getAll(): List<Relay> = relayPool.getAll()

fun sendFilterOnlyIfDisconnected(
subscriptionId: String = UUID.randomUUID().toString().substring(0..10),
filters: List<TypedFilter> = listOf(),
Expand Down

0 comments on commit 879f70f

Please sign in to comment.