field_lib

Cross-platform Rust runtime for Radroots iOS and Android apps
git clone https://radroots.dev/git/field_lib.git
Log | Files | Refs | README | LICENSE

commit b6559d5a036e4aedb9b5d71615972374ea48945c
parent 7835c8c135745f6df33e86683407b41a305a6662
Author: triesap <tyson@radroots.org>
Date:   Wed,  4 Mar 2026 14:11:02 +0000

nostr: migrate consumers to parsed event wrappers

Diffstat:
Mcrates/field_core/src/runtime/mod.rs | 9+++++++--
Mcrates/field_core/src/runtime/nostr.rs | 24++++++++++++------------
2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/crates/field_core/src/runtime/mod.rs b/crates/field_core/src/runtime/mod.rs @@ -31,8 +31,13 @@ pub struct RadrootsRuntime { pub(crate) shutting_down: AtomicBool, pub(crate) platform_app: RwLock<Option<AppInfoPlatform>>, #[cfg(feature = "nostr-client")] - pub(crate) post_events_rx: - Mutex<Option<Receiver<radroots_events::post::RadrootsPostEventMetadata>>>, + pub(crate) post_events_rx: Mutex< + Option< + Receiver< + radroots_events_codec::parsed::RadrootsParsedData<radroots_events::post::RadrootsPost>, + >, + >, + >, } #[cfg_attr(not(coverage_nightly), uniffi::export)] diff --git a/crates/field_core/src/runtime/nostr.rs b/crates/field_core/src/runtime/nostr.rs @@ -64,14 +64,14 @@ pub struct NostrPostEventMetadata { #[cfg(feature = "nostr-client")] fn map_post_event_metadata( - event: radroots_events::post::RadrootsPostEventMetadata, + event: radroots_events_codec::parsed::RadrootsParsedData<radroots_events::post::RadrootsPost>, ) -> NostrPostEventMetadata { NostrPostEventMetadata { id: event.id, author: event.author, published_at: event.published_at as u64, post: NostrPost { - content: event.post.content, + content: event.data.content, }, } } @@ -164,16 +164,16 @@ impl RadrootsRuntime { author: m.author, published_at: m.published_at as u64, profile: NostrProfile { - name: m.profile.name.into(), - display_name: m.profile.display_name.into(), - nip05: m.profile.nip05.into(), - about: m.profile.about.into(), - website: m.profile.website, - picture: m.profile.picture, - banner: m.profile.banner, - lud06: m.profile.lud06, - lud16: m.profile.lud16, - bot: m.profile.bot, + name: m.data.profile.name.into(), + display_name: m.data.profile.display_name.into(), + nip05: m.data.profile.nip05.into(), + about: m.data.profile.about.into(), + website: m.data.profile.website, + picture: m.data.profile.picture, + banner: m.data.profile.banner, + lud06: m.data.profile.lud06, + lud16: m.data.profile.lud16, + bot: m.data.profile.bot, }, }); }