commit 48ea15d87b9bffe7ac783908ac2e1416f69b825c
parent db695affa3c342ecd82576aa934744c098460759
Author: kernelkind <kernelkind@gmail.com>
Date: Tue, 24 Feb 2026 18:40:09 -0500
feat(outbox-int): use outbox for sending posts
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs
@@ -543,7 +543,8 @@ 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.legacy_pool, &mut app.drafts) {
+ let mut publisher = ctx.remote.publisher(ctx.accounts);
+ match new_post_action.execute(ctx.ndb, &txn, &mut publisher, &mut app.drafts) {
Err(err) => tracing::error!("Error executing post action: {err}"),
Ok(_) => tracing::debug!("Post action executed"),
}
diff --git a/crates/notedeck_columns/src/ui/note/post.rs b/crates/notedeck_columns/src/ui/note/post.rs
@@ -10,7 +10,7 @@ use egui::{
widgets::text_edit::TextEdit,
Frame, Layout, Margin, Pos2, ScrollArea, Sense, TextBuffer,
};
-use enostr::{FilledKeypair, FullKeypair, NoteId, Pubkey, RelayPool};
+use enostr::{FilledKeypair, FullKeypair, NoteId, Pubkey};
use nostrdb::{Ndb, Transaction};
use notedeck::media::latest::LatestImageTex;
use notedeck::media::AnimationMode;
@@ -18,7 +18,8 @@ use notedeck::media::AnimationMode;
use notedeck::platform::android::try_open_file_picker;
use notedeck::platform::get_next_selected_file;
use notedeck::{
- name::get_display_name, supported_mime_hosted_at_url, tr, Localization, NoteAction, NoteContext,
+ name::get_display_name, supported_mime_hosted_at_url, tr, Localization, NoteAction,
+ NoteContext, PublishApi, RelayType,
};
use notedeck::{DragResponse, PixelDimensions};
use notedeck_ui::{
@@ -70,7 +71,7 @@ impl NewPostAction {
&self,
ndb: &Ndb,
txn: &Transaction,
- pool: &mut RelayPool,
+ publisher: &mut PublishApi<'_, '_>,
drafts: &mut Drafts,
) -> Result<()> {
let seckey = self.post.account.secret_key.to_secret_bytes();
@@ -96,7 +97,7 @@ impl NewPostAction {
let _ = ndb.process_event_with(&json, nostrdb::IngestMetadata::new().client(true));
}
- pool.send(&event);
+ publisher.publish_note(¬e, RelayType::AccountsWrite);
drafts.get_from_post_type(&self.post_type).clear();
Ok(())