mirror of
https://github.com/block/buzz.git
synced 2026-10-30 22:11:36 +00:00
If the membership write failed after a kind:9000 was stored, the relay logged the failure and still accepted the event. A resend then returned `duplicate:`, so the person was never added. kind:9000 now uses the same atomic path as kind:9002: `put_members_with_event` takes the membership lock, stores the event and writes every allowed person in one transaction. A failure stores nothing and returns `error:`, so the client can resend the same event. When the decisions under the lock refuse everyone, nothing is stored and the event is rejected with the text validation gives. Before, a single-person add refused there was accepted with an empty message. NOSTR.md now says a failed kind:9000 can be resent as is. Drops the `Db::put_members` wrapper, which no longer has callers. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Luke Tornquist <tornquist@squareup.com>