From 52ea30eeaef401917c508141652f4c450a06183b Mon Sep 17 00:00:00 2001 From: Mado Date: Thu, 11 Jul 2024 10:46:51 +0900 Subject: [PATCH] Do not include file names in `NOTICE` and `OK` messages --- src/lib.rs | 2 +- src/nostr.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1b175ac..e27e992 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -379,7 +379,7 @@ impl WebSocketService { } } if !self.replied { - let reply = NostrReply::Notice(format!("error: {}", e)); + let reply = NostrReply::Notice(format!("error: {}", e.inner)); self.websocket.send(Message::text(reply.as_json())).await?; } if self.error_punishment >= 1.0 { diff --git a/src/nostr.rs b/src/nostr.rs index 8e60d8a..1632092 100644 --- a/src/nostr.rs +++ b/src/nostr.rs @@ -273,7 +273,7 @@ impl WebSocketService { if !event_flags.author_is_an_authorized_user || GLOBALS.config.read().verify_events { // Verify the event is valid (id is hash, signature is valid) if let Err(e) = event.verify() { - return Err(ChorusError::EventIsInvalid(format!("{}", e)).into()); + return Err(ChorusError::EventIsInvalid(format!("{}", e.inner)).into()); } }