Skip to content

add "mute" OK=false status for no-op ephemeral events#1965

Merged
fiatjaf merged 1 commit into
masterfrom
ephemeral-mute
Jul 7, 2025
Merged

add "mute" OK=false status for no-op ephemeral events#1965
fiatjaf merged 1 commit into
masterfrom
ephemeral-mute

Conversation

@fiatjaf

@fiatjaf fiatjaf commented Jun 27, 2025

Copy link
Copy Markdown
Member

This will probably make RPC and real-time communication use cases like NIP-46, NIP-47 etc much better, as the client sending the message will be able to learn instantly that their message wasn't read by anyone, instead of having to wait for some arbitrary amount of time and cancel the request because the other side is taking too long to answer.

This is implemented in https://github.com/fiatjaf/khatru.

@staab

staab commented Jun 27, 2025

Copy link
Copy Markdown
Member

This is fine, with the proviso that if the relay handles the event itself (like with #1079) it should not send a mute reply.

@vitorpamplona

Copy link
Copy Markdown
Collaborator

mute is a weird word choice, though.

How about ignored, abandoned, dropped, or discarded?

@fiatjaf

fiatjaf commented Jun 27, 2025

Copy link
Copy Markdown
Member Author

I agree it's weird, but I couldn't think of anything better. I guess ignored is better, the others are also weird as they could imply different meanings. I'm fine with whatever.

@vitorpamplona

Copy link
Copy Markdown
Collaborator

How about unclaimed?

@mikedilger

Copy link
Copy Markdown
Contributor

How about no consumers?

+1 on this idea

@greenart7c3

Copy link
Copy Markdown
Contributor

no consumers feels better

@eskema

eskema commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

feel it shoud be a single word, how about unrelayed?

@fiatjaf

fiatjaf commented Jul 2, 2025

Copy link
Copy Markdown
Member Author

What do you have against ignored?

@eskema

eskema commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

ignoring to me means it was seen but chose to ignore. in this case, it wasn't seen, so it couldn't have been ignored. you can't ignore something if you don't know it exists.. it shouldn't matter much though so I'm fine with whatever

@fiatjaf

fiatjaf commented Jul 2, 2025

Copy link
Copy Markdown
Member Author

We should have gone with numbers.

unrelayed makes sense, but feels redundant, as all other types of error also imply "unrelayed".

Since we can't do more than one word I guess mute is the best then.

@staab

staab commented Jul 2, 2025

Copy link
Copy Markdown
Member

We still could, just use 93692635: this message wasn't relayed because no one was listening for it

No, but mute is fine

@vitorpamplona

vitorpamplona commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

I like well-defined, extremely specific error codes. 93692635: ... works for me.

@mikedilger

Copy link
Copy Markdown
Contributor

I read "We should have gone with numbers" to mean something like "relayed to 7 subscribed clients" and then use 0 when nobody was listening. But I think this doesn't fit into the protocol as specified.

@fiatjaf

fiatjaf commented Jul 7, 2025

Copy link
Copy Markdown
Member Author

Please, gentlemen, can I merge?

@staab

staab commented Jul 7, 2025

Copy link
Copy Markdown
Member

Yes, this is handled in flotilla

@fiatjaf
fiatjaf merged commit 477e3df into master Jul 7, 2025
@fiatjaf
fiatjaf deleted the ephemeral-mute branch July 7, 2025 13:59
pats2sats pushed a commit to sudonym-btc/accommodation-nip that referenced this pull request May 20, 2026
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.

6 participants