notedeck

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

commit baa1655c55ce7fc635638a3aa9279bda1d260d3c
parent c52a49f251a8d93396077c4fb895cc26bdf60006
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 17 Feb 2026 17:10:36 -0800

post: ingest notes locally so they appear immediately

Notes were only ingested into nostrdb when received back from relays.
This meant offline-created notes were silently lost - the draft was
cleared but the note never appeared in feeds or search.

Ingest the note into the local database before sending to relays,
matching the pattern used by repost and reaction code paths.

Fixes: https://github.com/damus-io/notedeck/issues/1050

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

Diffstat:
Mcrates/notedeck_columns/src/ui/note/post.rs | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/crates/notedeck_columns/src/ui/note/post.rs b/crates/notedeck_columns/src/ui/note/post.rs @@ -89,7 +89,14 @@ impl NewPostAction { } }; - pool.send(&enostr::ClientMessage::event(&note)?); + let event = enostr::ClientMessage::event(&note)?; + + // Ingest locally so the note appears immediately, even when offline + if let Ok(json) = event.to_json() { + let _ = ndb.process_event_with(&json, nostrdb::IngestMetadata::new().client(true)); + } + + pool.send(&event); drafts.get_from_post_type(&self.post_type).clear(); Ok(())