feat: editor

This commit is contained in:
2024-02-26 15:10:42 +07:00
parent 63db8b1423
commit 98ef1927f2
12 changed files with 256 additions and 135 deletions

View File

@@ -137,25 +137,6 @@ pub async fn publish(
}
}
#[tauri::command]
pub async fn reply_to(
content: &str,
tags: Vec<String>,
state: State<'_, Nostr>,
) -> Result<EventId, String> {
let client = &state.client;
if let Ok(event_tags) = Tag::parse(tags) {
let event = client
.publish_text_note(content, vec![event_tags])
.await
.expect("Publish reply failed");
Ok(event)
} else {
Err("Reply failed".into())
}
}
#[tauri::command]
pub async fn repost(id: &str, pubkey: &str, state: State<'_, Nostr>) -> Result<EventId, ()> {
let client = &state.client;