refactor
This commit is contained in:
@@ -104,13 +104,8 @@ impl NostrBackend {
|
||||
/// event is immediately visible to [`NostrBackend::query`].
|
||||
pub async fn send(&self, builder: EventBuilder) -> Result<Event> {
|
||||
let event = builder.finalize_async(&self.signer).await?;
|
||||
|
||||
let output = self.client.send_event(&event).await?;
|
||||
|
||||
// Keep our own events in the local database; the notification pump
|
||||
// only fires for events received from relays.
|
||||
self.client.database().save_event(&event).await?;
|
||||
|
||||
if output.success.is_empty() && !output.failed.is_empty() {
|
||||
let reasons = output
|
||||
.failed
|
||||
|
||||
Reference in New Issue
Block a user