khatru: ForceBroadcastEvent()

This commit is contained in:
fiatjaf
2025-10-31 13:05:19 -03:00
parent 13c44a4644
commit 32bbff615a
3 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -7,5 +7,10 @@ import (
// BroadcastEvent emits an event to all listeners whose filters' match, skipping all filters and actions
// it also doesn't attempt to store the event or trigger any reactions or callbacks
func (rl *Relay) BroadcastEvent(evt nostr.Event) int {
return rl.notifyListeners(evt)
return rl.notifyListeners(evt, false)
}
// ForceBroadcastEvent is like BroadcastEvent, but it skips the PreventBroadcast hook.
func (rl *Relay) ForceBroadcastEvent(evt nostr.Event) int {
return rl.notifyListeners(evt, true)
}