if there is an ephemeral hook the relay is never mute.

fixes https://github.com/fiatjaf/khatru/pull/53
This commit is contained in:
fiatjaf
2025-06-06 21:44:42 -03:00
parent 5705647c6b
commit 034902c3e3

View File

@@ -240,7 +240,7 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
// the number of notified listeners matters in ephemeral events
if nostr.IsEphemeralKind(env.Event.Kind) {
if n == 0 {
if n == 0 && len(rl.OnEphemeralEvent) == 0 {
ok = false
reason = "mute: no one was listening for this"
} else {