Merge pull request #25 from nanikamado/hide-filenames

Do not include file names in `NOTICE` and `OK` messages
This commit is contained in:
Michael Dilger 2024-07-11 03:46:40 +00:00 committed by GitHub
commit 4ba1e2d808
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ impl WebSocketService {
} }
} }
if !self.replied { 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?; self.websocket.send(Message::text(reply.as_json())).await?;
} }
if self.error_punishment >= 1.0 { if self.error_punishment >= 1.0 {

View File

@ -273,7 +273,7 @@ impl WebSocketService {
if !event_flags.author_is_an_authorized_user || GLOBALS.config.read().verify_events { if !event_flags.author_is_an_authorized_user || GLOBALS.config.read().verify_events {
// Verify the event is valid (id is hash, signature is valid) // Verify the event is valid (id is hash, signature is valid)
if let Err(e) = event.verify() { if let Err(e) = event.verify() {
return Err(ChorusError::EventIsInvalid(format!("{}", e)).into()); return Err(ChorusError::EventIsInvalid(format!("{}", e.inner)).into());
} }
} }