Expose the relay in the client connection event

This commit is contained in:
Wilson Silva
2024-04-05 15:31:49 +01:00
parent 61eb0459d4
commit a0cf41bfb4
7 changed files with 30 additions and 21 deletions

View File

@@ -28,7 +28,7 @@ The `:connect` event is fired when a connection with a WebSocket is opened. You
client = Nostr::Client.new
relay = Nostr::Relay.new(url: 'wss://relay.damus.io', name: 'Damus')
client.on :connect do
client.on :connect do |relay|
# When this block executes, you're connected to the relay
end