nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit f76ba7ad5af6ccfd3b3f87cd9a2e6a726b193b1f
parent 18c75b5c64664e012cdc17abadf4a300556a89d7
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  3 Jan 2024 14:44:19 -0800

subs: notify on profile notes as well

We missed this in the original subscription code

Diffstat:
Msrc/nostrdb.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -2962,6 +2962,15 @@ static void *ndb_writer_thread(void *data) note_nkey = ndb_write_note(&txn, &msg->note, scratch, scratch_size); + if (note_nkey > 0) { + written_notes[num_notes++] = + (struct written_note){ + .note_id = note_nkey, + .note = &msg->note, + }; + } else { + ndb_debug("failed to write note\n"); + } if (msg->profile.record.builder) { // only write if parsing didn't fail ndb_write_profile(&txn, &msg->profile,