commit 0586c51060462ec691ddba4dfafd2745fa8e8ff0
parent 958661804d919f6d2a5eb4a5856b785d8a941696
Author: William Casarin <jb55@jb55.com>
Date: Sun, 2 Nov 2025 15:20:27 -0800
metadata: expose header init fn
needed on the rust side since we're not using the C builder API directly
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/metadata.c b/src/metadata.c
@@ -83,7 +83,7 @@ int ndb_reaction_set(union ndb_reaction_str *reaction, const char *str)
return ndb_reaction_set_str(reaction, str);
}
-static void ndb_note_meta_header_init(struct ndb_note_meta *meta)
+void ndb_note_meta_header_init(struct ndb_note_meta *meta)
{
meta->version = 1;
meta->flags = 0;
diff --git a/src/nostrdb.h b/src/nostrdb.h
@@ -675,6 +675,7 @@ uint32_t *ndb_note_meta_reaction_count(struct ndb_note_meta_entry *entry);
uint64_t *ndb_note_meta_flags(struct ndb_note_meta *meta);
void ndb_note_meta_build(struct ndb_note_meta_builder *builder, struct ndb_note_meta **meta);
void ndb_note_meta_counts_set(struct ndb_note_meta_entry *entry, uint32_t total_reactions, uint16_t quotes, uint16_t direct_replies, uint32_t thread_replies, uint16_t reposts);
+void ndb_note_meta_header_init(struct ndb_note_meta *);
void ndb_note_meta_reaction_set(struct ndb_note_meta_entry *entry, uint32_t count, union ndb_reaction_str str);
void print_note_meta(struct ndb_note_meta *meta);