Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify what happens when a duplicate subscription is sent, remove CLOSED on duplicate subscription #1333

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

staab
Copy link
Member

@staab staab commented Jun 28, 2024

Fixes #1332

@staab staab requested a review from fiatjaf June 28, 2024 00:00
@bezysoftware
Copy link
Contributor

LGTM!

@bezysoftware
Copy link
Contributor

Ping @fiatjaf

@@ -169,7 +169,6 @@ This NIP defines no rules for how `NOTICE` messages should be sent or treated.
* `["OK", "b1a649ebe8...", false, "pow: difficulty 26 is less than 30"]`
* `["OK", "b1a649ebe8...", false, "error: could not connect to the database"]`
- `CLOSED` messages MUST be sent in response to a `REQ` when the relay refuses to fulfill it. It can also be sent when a relay decides to kill a subscription on its side before a client has disconnected or sent a `CLOSE`. This message uses the same pattern of `OK` messages with the machine-readable prefix and human-readable message. Some examples:
* `["CLOSED", "sub1", "duplicate: sub1 already opened"]`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest we replace this example with one that may lead to more relays enforcing the max sub id length

  • ["CLOSED", "sub1", "error: subscription id too large"]

@mikedilger
Copy link
Contributor

ACK

@staab staab merged commit 24e97c2 into nostr-protocol:master Aug 31, 2024
@staab staab deleted the clarify-nip01 branch October 16, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NIP-01 duplicate subscription
6 participants