mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Persona create, edit, and delete now reach the relay so personas persist across reboots and reflect in other Buzz clients. #939 built the local retention primitives but left them inert; this wires every persona writer to a single publish path. pending_sync is the seam: each writer (UI create/edit, delete tombstone, launch reconcile) retains a signed event locally with pending_sync = 1 while holding the managed-agents store lock, and one background flush loop is the sole relay publisher. Delete purges the persona's retention row inside the lock-held command body (closing the same-second resurrect race) and enqueues a NIP-09 a-tag-only kind:5 tombstone for the flush loop to publish out of band. mark_synced is compare-and-clear on created_at+content so an edit landing mid-flush is never falsely cleared. Ownership is intrinsic to the signing key, so the only skip anywhere is is_builtin. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>