feat: answer REQ with CLOSED when no relay is configured #5

Merged
padreug merged 2 commits from feat/closed-on-req into main 2026-09-13 14:12:48 +00:00

2 commits

Author SHA1 Message Date
c4c1a1c342 chore: bump version to 1.2.0-aio.3
Some checks failed
ci.yml / chore: bump version to 1.2.0-aio.3 (pull_request) Failing after 0s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Tbyw6FwjhEJg3gHfPHxWt
2026-09-13 16:07:37 +02:00
7e7120fa82 feat: answer REQ with CLOSED when no relay is configured
Ported from the upstream PR (lnbits/nostrclient#74, idea from #68).
Nothing will ever serve a subscription when nostrclient has no relay
at all, so refuse it per NIP-01 instead of registering it silently.
Keyed on "no relay configured" rather than "none connected": a
configured relay that is merely reconnecting gets the cached
subscription replayed, so refusing the REQ there would be a regression.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Tbyw6FwjhEJg3gHfPHxWt
2026-09-13 16:07:37 +02:00