Description
When an extension (like nostrmarket) publishes an event via nostrclient's internal websocket, nostrclient currently accepts the event even if there are no relay connections configured or active.
This makes it impossible for the calling extension to know if the message was actually delivered to any relays.
Current Behavior
- Extension sends event to nostrclient via internal WS
- nostrclient accepts the event (internal WS is open)
- Event goes nowhere because no relays are configured
- Extension thinks message was sent successfully
Proposed Behavior
When publish_nostr_event is called and there are no active relay connections:
- Return an error response indicating no relays available
- Or expose a status endpoint that extensions can query to check relay connectivity
Use Case
In nostrmarket (#134), we want to show users when their direct messages failed to send. We can detect when nostrclient's websocket is completely unavailable, but not when nostrclient is running with zero relay connections.
Related
Description
When an extension (like nostrmarket) publishes an event via nostrclient's internal websocket, nostrclient currently accepts the event even if there are no relay connections configured or active.
This makes it impossible for the calling extension to know if the message was actually delivered to any relays.
Current Behavior
Proposed Behavior
When
publish_nostr_eventis called and there are no active relay connections:Use Case
In nostrmarket (#134), we want to show users when their direct messages failed to send. We can detect when nostrclient's websocket is completely unavailable, but not when nostrclient is running with zero relay connections.
Related