notedeck

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

commit c47b3daecf982c7918f1418b3829d113d08a4706
parent 4e2683c3ed449f4a4f51d30b8a03b596dcf62d42
Author: kernelkind <kernelkind@gmail.com>
Date:   Tue, 24 Feb 2026 16:57:34 -0500

refactor(TMP): pool -> legacy pool shim for commit history

Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Mcrates/notedeck/src/app.rs | 44+++++++++++++++++++++++---------------------
Mcrates/notedeck/src/context.rs | 2+-
Mcrates/notedeck_chrome/src/chrome.rs | 4++--
Mcrates/notedeck_clndash/src/ui.rs | 2+-
Mcrates/notedeck_columns/src/accounts/mod.rs | 15++++++++++-----
Mcrates/notedeck_columns/src/app.rs | 22+++++++++++++---------
Mcrates/notedeck_columns/src/decks.rs | 2+-
Mcrates/notedeck_columns/src/nav.rs | 52+++++++++++++++++++++++++++++++---------------------
Mcrates/notedeck_columns/src/toolbar.rs | 2+-
Mcrates/notedeck_columns/src/ui/add_column.rs | 10+++++-----
Mcrates/notedeck_columns/src/ui/note/post.rs | 2+-
Mcrates/notedeck_columns/src/ui/relay.rs | 2+-
Mcrates/notedeck_dave/src/lib.rs | 18+++++++++++-------
Mcrates/notedeck_dave/src/ui/dave.rs | 2+-
Mcrates/notedeck_messages/src/nip17/message.rs | 2+-
Mcrates/notedeck_nostrverse/src/lib.rs | 10+++++-----
16 files changed, 108 insertions(+), 83 deletions(-)

diff --git a/crates/notedeck/src/app.rs b/crates/notedeck/src/app.rs @@ -65,7 +65,7 @@ pub struct Notedeck { ndb: Ndb, img_cache: Images, unknown_ids: UnknownIds, - pool: RelayPool, + legacy_pool: RelayPool, note_cache: NoteCache, accounts: Accounts, global_wallet: GlobalWallet, @@ -140,7 +140,8 @@ impl eframe::App for Notedeck { self.nip05_cache.poll(); // handle account updates - self.accounts.update(&mut self.ndb, &mut self.pool, ctx); + self.accounts + .update(&mut self.ndb, &mut self.legacy_pool, ctx); self.zaps .process(&mut self.accounts, &mut self.global_wallet, &self.ndb); @@ -159,11 +160,11 @@ impl eframe::App for Notedeck { self.app_size.try_save_app_size(ctx); if self.args.options.contains(NotedeckOptions::RelayDebug) { - if self.pool.debug.is_none() { - self.pool.use_debug(); + if self.legacy_pool.debug.is_none() { + self.legacy_pool.use_debug(); } - if let Some(debug) = &mut self.pool.debug { + if let Some(debug) = &mut self.legacy_pool.debug { RelayDebugView::window(ctx, debug); } } @@ -241,10 +242,10 @@ impl Notedeck { }; // AccountManager will setup the pool on first update - let mut pool = RelayPool::new(); + let mut legacy_pool = RelayPool::new(); { let ctx = ctx.clone(); - if let Err(err) = pool.add_multicast_relay(move || ctx.request_repaint()) { + if let Err(err) = legacy_pool.add_multicast_relay(move || ctx.request_repaint()) { error!("error setting up multicast relay: {err}"); } } @@ -260,7 +261,7 @@ impl Notedeck { FALLBACK_PUBKEY(), &mut ndb, &txn, - &mut pool, + &mut legacy_pool, ctx, &mut unknown_ids, ); @@ -281,7 +282,7 @@ impl Notedeck { } if let Some(first) = parsed_args.keys.first() { - accounts.select_account(&first.pubkey, &mut ndb, &txn, &mut pool, ctx); + accounts.select_account(&first.pubkey, &mut ndb, &txn, &mut legacy_pool, ctx); } let img_cache = Images::new(img_cache_dir); @@ -323,7 +324,7 @@ impl Notedeck { ndb, img_cache, unknown_ids, - pool, + legacy_pool, note_cache, accounts, global_wallet, @@ -382,7 +383,7 @@ impl Notedeck { ndb: &mut self.ndb, img_cache: &mut self.img_cache, unknown_ids: &mut self.unknown_ids, - pool: &mut self.pool, + legacy_pool: &mut self.legacy_pool, note_cache: &mut self.note_cache, accounts: &mut self.accounts, global_wallet: &mut self.global_wallet, @@ -492,12 +493,12 @@ pub fn try_process_events_core( ctx2.request_repaint(); }; - app_ctx.pool.keepalive_ping(wakeup); + app_ctx.legacy_pool.keepalive_ping(wakeup); // NOTE: we don't use the while let loop due to borrow issues #[allow(clippy::while_let_loop)] loop { - let ev = if let Some(ev) = app_ctx.pool.try_recv() { + let ev = if let Some(ev) = app_ctx.legacy_pool.try_recv() { ev.into_owned() } else { break; @@ -508,7 +509,7 @@ pub fn try_process_events_core( tracing::trace!("Opened relay {}", ev.relay); app_ctx .accounts - .send_initial_filters(app_ctx.pool, &ev.relay); + .send_initial_filters(app_ctx.legacy_pool, &ev.relay); } RelayEvent::Closed => tracing::warn!("{} connection closed", &ev.relay), RelayEvent::Other(msg) => { @@ -524,7 +525,7 @@ pub fn try_process_events_core( } if app_ctx.unknown_ids.ready_to_send() { - unknown_id_send(app_ctx.unknown_ids, app_ctx.pool); + unknown_id_send(app_ctx.unknown_ids, app_ctx.legacy_pool); } } @@ -532,12 +533,13 @@ pub fn try_process_events_core( fn process_message_core(ctx: &mut AppContext<'_>, relay: &str, msg: &RelayMessage) { match msg { RelayMessage::Event(_subid, ev) => { - let relay = if let Some(relay) = ctx.pool.relays.iter().find(|r| r.url() == relay) { - relay - } else { - error!("couldn't find relay {} for note processing!?", relay); - return; - }; + let relay = + if let Some(relay) = ctx.legacy_pool.relays.iter().find(|r| r.url() == relay) { + relay + } else { + error!("couldn't find relay {} for note processing!?", relay); + return; + }; match relay { PoolRelay::Websocket(_) => { diff --git a/crates/notedeck/src/context.rs b/crates/notedeck/src/context.rs @@ -17,7 +17,7 @@ pub struct AppContext<'a> { pub ndb: &'a mut Ndb, pub img_cache: &'a mut Images, pub unknown_ids: &'a mut UnknownIds, - pub pool: &'a mut RelayPool, + pub legacy_pool: &'a mut RelayPool, pub note_cache: &'a mut NoteCache, pub accounts: &'a mut Accounts, pub global_wallet: &'a mut GlobalWallet, diff --git a/crates/notedeck_chrome/src/chrome.rs b/crates/notedeck_chrome/src/chrome.rs @@ -572,7 +572,7 @@ fn chrome_handle_app_action( &mut columns.timeline_cache, &mut columns.threads, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, &txn, ctx.unknown_ids, ctx.accounts, @@ -629,7 +629,7 @@ fn columns_route_to_profile( &mut columns.timeline_cache, &mut columns.threads, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, &txn, ctx.unknown_ids, ctx.accounts, diff --git a/crates/notedeck_clndash/src/ui.rs b/crates/notedeck_clndash/src/ui.rs @@ -48,7 +48,7 @@ pub fn note_hover_ui( img_cache: ctx.img_cache, note_cache: ctx.note_cache, zaps: ctx.zaps, - pool: ctx.pool, + pool: ctx.legacy_pool, jobs: ctx.media_jobs.sender(), unknown_ids: ctx.unknown_ids, nip05_cache: ctx.nip05_cache, diff --git a/crates/notedeck_columns/src/accounts/mod.rs b/crates/notedeck_columns/src/accounts/mod.rs @@ -169,13 +169,13 @@ pub fn process_login_view_response( AccountLoginResponse::CreatingNew => { cur_router.route_to(Route::Accounts(AccountsRoute::Onboarding)); - onboarding.process(app_ctx.pool, app_ctx.ndb, subs, app_ctx.unknown_ids); + onboarding.process(app_ctx.legacy_pool, app_ctx.ndb, subs, app_ctx.unknown_ids); None } AccountLoginResponse::Onboarding(onboarding_response) => match onboarding_response { FollowPacksResponse::NoFollowPacks => { - onboarding.process(app_ctx.pool, app_ctx.ndb, subs, app_ctx.unknown_ids); + onboarding.process(app_ctx.legacy_pool, app_ctx.ndb, subs, app_ctx.unknown_ids); None } FollowPacksResponse::UserSelectedPacks(nip51_sets_ui_state) => { @@ -183,10 +183,15 @@ pub fn process_login_view_response( let kp = FullKeypair::generate(); - send_new_contact_list(kp.to_filled(), app_ctx.ndb, app_ctx.pool, pks_to_follow); - send_default_dms_relay_list(kp.to_filled(), app_ctx.ndb, app_ctx.pool); + send_new_contact_list( + kp.to_filled(), + app_ctx.ndb, + app_ctx.legacy_pool, + pks_to_follow, + ); + send_default_dms_relay_list(kp.to_filled(), app_ctx.ndb, app_ctx.legacy_pool); cur_router.go_back(); - onboarding.end_onboarding(app_ctx.pool, app_ctx.ndb); + onboarding.end_onboarding(app_ctx.legacy_pool, app_ctx.ndb); app_ctx.accounts.add_account(kp.to_keypair()) } diff --git a/crates/notedeck_columns/src/app.rs b/crates/notedeck_columns/src/app.rs @@ -191,7 +191,7 @@ fn try_process_event( damus.options.contains(AppOptions::SinceOptimize), &mut damus.timeline_cache, &mut damus.subscriptions, - app_ctx.pool, + app_ctx.legacy_pool, &ev.relay, app_ctx.accounts, ); @@ -203,8 +203,12 @@ fn try_process_event( }); for (kind, timeline) in &mut damus.timeline_cache { - let is_ready = - timeline::is_timeline_ready(app_ctx.ndb, app_ctx.pool, timeline, app_ctx.accounts); + let is_ready = timeline::is_timeline_ready( + app_ctx.ndb, + app_ctx.legacy_pool, + timeline, + app_ctx.accounts, + ); if is_ready { schedule_timeline_load( @@ -246,7 +250,7 @@ fn try_process_event( ListKind::PeopleList(plr), )) => { let plr = plr.clone(); - for relay in &mut app_ctx.pool.relays { + for relay in &mut app_ctx.legacy_pool.relays { timeline::fetch_people_list( &mut damus.subscriptions, relay, @@ -416,7 +420,7 @@ fn handle_eose( // oneshot subs just close when they're done SubKind::OneShot => { let msg = ClientMessage::close(subid.to_string()); - ctx.pool.send_to(&msg, relay_url); + ctx.legacy_pool.send_to(&msg, relay_url); } SubKind::FetchingContactList(timeline_uid) => { @@ -592,7 +596,7 @@ impl Damus { &txn, app_context.ndb, app_context.note_cache, - app_context.pool, + app_context.legacy_pool, &timeline_kind, ) { add_result.process( @@ -846,7 +850,7 @@ fn render_damus_mobile( &pubkey, app_ctx.ndb, &txn, - app_ctx.pool, + app_ctx.legacy_pool, ui.ctx(), ); } @@ -1023,7 +1027,7 @@ fn timelines_view( ctx.img_cache, ctx.media_jobs.sender(), current_route.as_ref(), - ctx.pool, + ctx.legacy_pool, ) .show(ui); @@ -1127,7 +1131,7 @@ fn timelines_view( let txn = nostrdb::Transaction::new(ctx.ndb).expect("txn"); ctx.accounts - .select_account(&pubkey, ctx.ndb, &txn, ctx.pool, ui.ctx()); + .select_account(&pubkey, ctx.ndb, &txn, ctx.legacy_pool, ui.ctx()); } ProcessNavResult::ExternalNoteAction(note_action) => { diff --git a/crates/notedeck_columns/src/decks.rs b/crates/notedeck_columns/src/decks.rs @@ -461,7 +461,7 @@ pub fn add_demo_columns( &txn, ctx.ndb, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, kind, ) { results.process( diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs @@ -102,7 +102,7 @@ impl SwitchingAction { &switch_action.switch_to, ctx.ndb, &txn, - ctx.pool, + ctx.legacy_pool, ui_ctx, ); @@ -129,12 +129,18 @@ impl SwitchingAction { AccountsAction::Remove(to_remove) => 's: { if !ctx .accounts - .remove_account(to_remove, ctx.ndb, ctx.pool, ui_ctx) + .remove_account(to_remove, ctx.ndb, ctx.legacy_pool, ui_ctx) { break 's; } - decks_cache.remove(ctx.i18n, to_remove, timeline_cache, ctx.ndb, ctx.pool); + decks_cache.remove( + ctx.i18n, + to_remove, + timeline_cache, + ctx.ndb, + ctx.legacy_pool, + ); } }, SwitchingAction::Columns(columns_action) => match *columns_action { @@ -142,7 +148,7 @@ impl SwitchingAction { let kinds_to_pop = get_active_columns_mut(ctx.i18n, ctx.accounts, decks_cache) .delete_column(index); for kind in &kinds_to_pop { - if let Err(err) = timeline_cache.pop(kind, ctx.ndb, ctx.pool) { + if let Err(err) = timeline_cache.pop(kind, ctx.ndb, ctx.legacy_pool) { error!("error popping timeline: {err}"); } } @@ -161,7 +167,7 @@ impl SwitchingAction { index, timeline_cache, ctx.ndb, - ctx.pool, + ctx.legacy_pool, ); } }, @@ -297,7 +303,7 @@ fn process_nav_resp( &mut app.threads, &mut app.view_state, ctx.ndb, - ctx.pool, + ctx.legacy_pool, return_type, col, ); @@ -316,7 +322,7 @@ fn process_nav_resp( handle_navigating_timeline( ctx.ndb, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, ctx.accounts, app, col, @@ -347,7 +353,7 @@ fn process_nav_resp( handle_navigating_timeline( ctx.ndb, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, ctx.accounts, app, col, @@ -528,7 +534,7 @@ fn process_render_nav_action( let kinds_to_pop = app.columns_mut(ctx.i18n, ctx.accounts).delete_column(col); for kind in &kinds_to_pop { - if let Err(err) = app.timeline_cache.pop(kind, ctx.ndb, ctx.pool) { + if let Err(err) = app.timeline_cache.pop(kind, ctx.ndb, ctx.legacy_pool) { error!("error popping timeline: {err}"); } } @@ -537,7 +543,7 @@ fn process_render_nav_action( } RenderNavAction::PostAction(new_post_action) => { let txn = Transaction::new(ctx.ndb).expect("txn"); - match new_post_action.execute(ctx.ndb, &txn, ctx.pool, &mut app.drafts) { + match new_post_action.execute(ctx.ndb, &txn, ctx.legacy_pool, &mut app.drafts) { Err(err) => tracing::error!("Error executing post action: {err}"), Ok(_) => tracing::debug!("Post action executed"), } @@ -565,7 +571,7 @@ fn process_render_nav_action( &mut app.timeline_cache, &mut app.threads, ctx.note_cache, - ctx.pool, + ctx.legacy_pool, &txn, ctx.unknown_ids, ctx.accounts, @@ -596,7 +602,7 @@ fn process_render_nav_action( ctx.i18n, ui.ctx(), ctx.ndb, - ctx.pool, + ctx.legacy_pool, ctx.accounts, ), RenderNavAction::WalletAction(wallet_action) => { @@ -604,15 +610,17 @@ fn process_render_nav_action( } RenderNavAction::RelayAction(action) => { ctx.accounts - .process_relay_action(ui.ctx(), ctx.pool, action); + .process_relay_action(ui.ctx(), ctx.legacy_pool, action); None } RenderNavAction::SettingsAction(action) => { action.process_settings_action(app, ctx, ui.ctx()) } - RenderNavAction::RepostAction(action) => { - action.process(ctx.ndb, &ctx.accounts.get_selected_account().key, ctx.pool) - } + RenderNavAction::RepostAction(action) => action.process( + ctx.ndb, + &ctx.accounts.get_selected_account().key, + ctx.legacy_pool, + ), RenderNavAction::ShowFollowing(pubkey) => Some(RouterAction::RouteTo( crate::route::Route::Following(pubkey), RouterType::Stack, @@ -650,7 +658,7 @@ fn render_nav_body( img_cache: ctx.img_cache, note_cache: ctx.note_cache, zaps: ctx.zaps, - pool: ctx.pool, + pool: ctx.legacy_pool, jobs: ctx.media_jobs.sender(), unknown_ids: ctx.unknown_ids, nip05_cache: ctx.nip05_cache, @@ -720,9 +728,11 @@ fn render_nav_body( } }) } - Route::Relays => RelayView::new(ctx.pool, &mut app.view_state.id_string_map, ctx.i18n) - .ui(ui) - .map_output(RenderNavAction::RelayAction), + Route::Relays => { + RelayView::new(ctx.legacy_pool, &mut app.view_state.id_string_map, ctx.i18n) + .ui(ui) + .map_output(RenderNavAction::RelayAction) + } Route::Settings => { let db_path = ctx.args.db_path(ctx.path); @@ -1172,7 +1182,7 @@ fn render_nav_body( ui::report::ReportView::new(&mut app.view_state.selected_report_type).show(ui); if let Some(report_type) = resp { - notedeck::send_report_event(ctx.ndb, ctx.pool, kp, target, report_type); + notedeck::send_report_event(ctx.ndb, ctx.legacy_pool, kp, target, report_type); app.view_state.selected_report_type = None; return DragResponse::output(Some(RenderNavAction::Back)); } diff --git a/crates/notedeck_columns/src/toolbar.rs b/crates/notedeck_columns/src/toolbar.rs @@ -102,7 +102,7 @@ fn pop_to_root(app: &mut Damus, ctx: &mut AppContext, col_index: usize) { &mut app.threads, &mut app.view_state, ctx.ndb, - ctx.pool, + ctx.legacy_pool, ReturnType::Click, col_index, ); diff --git a/crates/notedeck_columns/src/ui/add_column.rs b/crates/notedeck_columns/src/ui/add_column.rs @@ -910,7 +910,7 @@ pub fn render_add_column_routes( contacts, ctx.i18n, ctx.media_jobs.sender(), - ctx.pool, + ctx.legacy_pool, ctx.unknown_ids, &mut app.view_state.people_lists, ); @@ -951,7 +951,7 @@ pub fn render_add_column_routes( ctx.ndb, &txn, &mut app.subscriptions, - ctx.pool, + ctx.legacy_pool, ctx.note_cache, app.options.contains(AppOptions::SinceOptimize), ctx.accounts, @@ -992,7 +992,7 @@ pub fn render_add_column_routes( ctx.ndb, &txn, &mut app.subscriptions, - ctx.pool, + ctx.legacy_pool, ctx.note_cache, app.options.contains(AppOptions::SinceOptimize), ctx.accounts, @@ -1103,7 +1103,7 @@ fn handle_create_people_list(app: &mut Damus, ctx: &mut AppContext<'_>, col: usi return; }; - notedeck::send_people_list_event(ctx.ndb, ctx.pool, kp, &name, &members); + notedeck::send_people_list_event(ctx.ndb, ctx.legacy_pool, kp, &name, &members); // Reset the people_lists cache so it picks up the new list app.view_state.people_lists = None; @@ -1128,7 +1128,7 @@ fn handle_create_people_list(app: &mut Damus, ctx: &mut AppContext<'_>, col: usi ctx.ndb, &txn, &mut app.subscriptions, - ctx.pool, + ctx.legacy_pool, ctx.note_cache, app.options.contains(AppOptions::SinceOptimize), ctx.accounts, diff --git a/crates/notedeck_columns/src/ui/note/post.rs b/crates/notedeck_columns/src/ui/note/post.rs @@ -899,7 +899,7 @@ mod preview { img_cache: app.img_cache, note_cache: app.note_cache, zaps: app.zaps, - pool: app.pool, + pool: app.legacy_pool, jobs: app.media_jobs.sender(), unknown_ids: app.unknown_ids, nip05_cache: app.nip05_cache, diff --git a/crates/notedeck_columns/src/ui/relay.rs b/crates/notedeck_columns/src/ui/relay.rs @@ -309,7 +309,7 @@ mod preview { fn update(&mut self, app: &mut AppContext<'_>, ui: &mut egui::Ui) -> AppResponse { self.pool.try_recv(); let mut id_string_map = HashMap::new(); - RelayView::new(app.pool, &mut id_string_map, app.i18n).ui(ui); + RelayView::new(app.legacy_pool, &mut id_string_map, app.i18n).ui(ui); AppResponse::none() } } diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -2506,7 +2506,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr .limit(500) .build(); let req = enostr::ClientMessage::req(sub_id.clone(), vec![pns_filter]); - app_ctx.pool.send_to(&req, &pns_relay); + app_ctx.legacy_pool.send_to(&req, &pns_relay); tracing::info!("re-subscribed for PNS events after relay reconnect"); } } @@ -2532,9 +2532,13 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr .kinds([enostr::pns::PNS_KIND as u64]) .authors([pns_keys.keypair.pubkey.bytes()]) .build(); - let result = - self.neg_sync - .process(neg_events, ctx.ndb, ctx.pool, &filter, &self.pns_relay_url); + let result = self.neg_sync.process( + neg_events, + ctx.ndb, + ctx.legacy_pool, + &filter, + &self.pns_relay_url, + ); // If events were found and we haven't hit the round limit, // trigger another sync to pull more recent data. @@ -2586,7 +2590,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr // Ensure the PNS relay is in the pool let egui_ctx = ui.ctx().clone(); let wakeup = move || egui_ctx.request_repaint(); - if let Err(e) = ctx.pool.add_url(self.pns_relay_url.clone(), wakeup) { + if let Err(e) = ctx.legacy_pool.add_url(self.pns_relay_url.clone(), wakeup) { tracing::warn!("failed to add PNS relay {}: {:?}", self.pns_relay_url, e); } @@ -2598,7 +2602,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr .build(); let sub_id = uuid::Uuid::new_v4().to_string(); let req = enostr::ClientMessage::req(sub_id.clone(), vec![pns_filter]); - ctx.pool.send_to(&req, &self.pns_relay_url); + ctx.legacy_pool.send_to(&req, &self.pns_relay_url); self.pns_relay_sub = Some(sub_id); tracing::info!("subscribed for PNS events on {}", self.pns_relay_url); @@ -2747,7 +2751,7 @@ impl notedeck::App for Dave { for event in all_events { match session_events::wrap_pns(&event.note_json, &pns_keys) { Ok(pns_json) => match enostr::ClientMessage::event_json(pns_json) { - Ok(msg) => ctx.pool.send_to(&msg, &self.pns_relay_url), + Ok(msg) => ctx.legacy_pool.send_to(&msg, &self.pns_relay_url), Err(e) => tracing::warn!("failed to build relay message: {:?}", e), }, Err(e) => tracing::warn!("failed to PNS-wrap event: {}", e), diff --git a/crates/notedeck_dave/src/ui/dave.rs b/crates/notedeck_dave/src/ui/dave.rs @@ -1142,7 +1142,7 @@ impl<'a> DaveUi<'a> { img_cache: ctx.img_cache, note_cache: ctx.note_cache, zaps: ctx.zaps, - pool: ctx.pool, + pool: ctx.legacy_pool, jobs: ctx.media_jobs.sender(), unknown_ids: ctx.unknown_ids, nip05_cache: ctx.nip05_cache, diff --git a/crates/notedeck_messages/src/nip17/message.rs b/crates/notedeck_messages/src/nip17/message.rs @@ -53,7 +53,7 @@ pub fn send_conversation_message( } } match ClientMessage::event_json(giftwrap_json.clone()) { - Ok(msg) => ctx.pool.send(&msg), + Ok(msg) => ctx.legacy_pool.send(&msg), Err(err) => tracing::error!("failed to build client message: {err}"), }; } diff --git a/crates/notedeck_nostrverse/src/lib.rs b/crates/notedeck_nostrverse/src/lib.rs @@ -215,7 +215,7 @@ impl NostrverseApp { if let Some(relay_url) = &self.relay_url { let egui_ctx = egui_ctx.clone(); if let Err(e) = ctx - .pool + .legacy_pool .add_url(relay_url.clone(), move || egui_ctx.request_repaint()) { tracing::error!("Failed to add nostrverse relay {}: {}", relay_url, e); @@ -242,7 +242,7 @@ impl NostrverseApp { if let Some(kp) = ctx.accounts.selected_filled() { let builder = nostr_events::build_space_event(&space, &self.state.space_ref.id); if let Some((msg, _id)) = nostr_events::ingest_event(builder, ctx.ndb, kp) { - self.send_to_relay(ctx.pool, &msg); + self.send_to_relay(ctx.legacy_pool, &msg); } } // room_sub (set up above) will pick up the ingested event @@ -375,7 +375,7 @@ impl NostrverseApp { let builder = nostr_events::build_space_event(&space, &self.state.space_ref.id); if let Some((msg, id)) = nostr_events::ingest_event(builder, ctx.ndb, kp) { self.last_save_id = Some(id); - self.send_to_relay(ctx.pool, &msg); + self.send_to_relay(ctx.legacy_pool, &msg); } tracing::info!("Saved space '{}'", self.state.space_ref.id); } @@ -524,7 +524,7 @@ impl NostrverseApp { self.presence_pub .maybe_publish(ctx.ndb, kp, &self.space_naddr, self_pos, now) { - self.send_to_relay(ctx.pool, &msg); + self.send_to_relay(ctx.legacy_pool, &msg); } } @@ -642,7 +642,7 @@ impl notedeck::App for NostrverseApp { self.initialize(ctx, &egui_ctx); // Send relay subscription once connected - self.maybe_send_relay_sub(ctx.pool); + self.maybe_send_relay_sub(ctx.legacy_pool); // Poll for space event updates self.poll_space_updates(ctx.ndb);