notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit a3c3016121e8756d5e8d15d9a7570c0e7962000a
parent 23a7651fab8d3f1b563a7639334f03bb2b8866d4
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 17 Feb 2026 11:43:17 -0800

fix PNS ingest: wrap as ["EVENT", {...}] for process_client_event

pns_ingest was passing bare {...} JSON to ndb.process_event which
expects ["EVENT","subid", {...}] format, silently failing. Use
process_client_event with ["EVENT", {...}] wrapping instead. This
was why no 1988/31988 events were appearing in ndb during sessions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Diffstat:
Mcrates/notedeck_dave/src/lib.rs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -160,7 +160,10 @@ fn pns_ingest( let pns_keys = enostr::pns::derive_pns_keys(secret_key); match session_events::wrap_pns(event_json, &pns_keys) { Ok(pns_json) => { - if let Err(e) = ndb.process_event(&pns_json) { + // wrap_pns returns bare {…} JSON, but process_client_event + // expects ["EVENT", {…}] format + let wrapped = format!("[\"EVENT\", {}]", pns_json); + if let Err(e) = ndb.process_client_event(&wrapped) { tracing::warn!("failed to ingest PNS event: {:?}", e); } }