From 8250e00f05040642f67faa92440e73d7eb0e5fb5 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Sat, 12 Feb 2022 16:22:12 -0600 Subject: [PATCH] fix: remove protostream module, and missing NOTICE --- src/lib.rs | 3 +-- src/main.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 62a97e1..ce9381c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,12 +2,11 @@ pub mod close; pub mod config; pub mod conn; pub mod db; -pub mod schema; pub mod error; pub mod event; pub mod hexrange; pub mod info; pub mod nip05; -pub mod protostream; +pub mod schema; pub mod subscription; pub mod utils; diff --git a/src/main.rs b/src/main.rs index eee9b52..22daff3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -530,8 +530,7 @@ async fn nostr_server( } Some(Err(Error::EventMaxLengthError(s))) => { info!("client {:?} sent event larger ({} bytes) than max size", cid, s); - //TODO - //nostr_stream.send(NoticeRes("event exceeded max size".to_owned())).await.ok(); + ws_stream.send(Message::Text(format!("[\"NOTICE\",\"{}\"]", "event exceeded max size"))).await.ok(); }, Some(Err(e)) => { info!("got non-fatal error from client: {:?}, error: {:?}", cid, e);