notedeck

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

commit b4c49c44a623d69da9c0c443491faeb9d4039cde
parent b14c124c4e6224a9e6b7b56c0f76d66e26962bc1
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 24 Feb 2026 11:49:30 -0800

nostrverse: let subscription handle demo room load after ingest

ingest_event is async — the write may not be visible immediately.
Instead of trying to read back with a fresh transaction (which can
race), rely on the room_sub subscription that's already set up to
pick up the ingested event on the next poll_room_updates() frame.

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

Diffstat:
Mcrates/notedeck_nostrverse/src/lib.rs | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/crates/notedeck_nostrverse/src/lib.rs b/crates/notedeck_nostrverse/src/lib.rs @@ -172,10 +172,8 @@ impl NostrverseApp { let builder = nostr_events::build_room_event(&space, &self.state.room_ref.id); nostr_events::ingest_event(builder, ctx.ndb, kp); } - - // Re-load now that we've ingested the demo - let txn = nostrdb::Transaction::new(ctx.ndb).expect("txn"); - self.load_room_from_ndb(ctx.ndb, &txn); + // room_sub (set up above) will pick up the ingested event + // on the next poll_room_updates() frame. } // Add self user