khatru: add post-delete success hook for NIP-09 #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Currently, when a NIP-09 kind 5 delete event is processed in khatru, the target event(s) are deleted via
DeleteEvent(id), but there is no dedicated hook that provides the full context of the deletion to downstream consumers like zooid.As a result, deletion events are not reliably broadcasted to Nostr relays (see zooid#1).
Problem
The current delete flow deletes the target events but does not expose:
This makes it impossible for zooid (and other relays) to properly fan out the deletion event.
Proposed Solution
Add a new hook
OnDeleteAppliedin khatru that is called after a target event has been successfully deleted.