mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Log reasons why incoming events are rejected (at least until we verify we are accepting them)
This commit is contained in:
parent
e682a3b0e0
commit
452522c39d
20
src/nostr.rs
20
src/nostr.rs
@ -179,15 +179,19 @@ impl WebSocketService {
|
||||
NostrReplyPrefix::None,
|
||||
"That event is deleted".to_string(),
|
||||
),
|
||||
ChorusError::EventIsInvalid(why) => {
|
||||
NostrReply::Ok(id, false, NostrReplyPrefix::Invalid, why)
|
||||
ChorusError::EventIsInvalid(ref why) => {
|
||||
log::error!("{}: {}", self.peer, e);
|
||||
NostrReply::Ok(id, false, NostrReplyPrefix::Invalid, why.to_string())
|
||||
}
|
||||
ChorusError::Restricted => NostrReply::Ok(
|
||||
id,
|
||||
false,
|
||||
NostrReplyPrefix::Restricted,
|
||||
PERSONAL_MSG.to_owned(),
|
||||
),
|
||||
ChorusError::Restricted => {
|
||||
log::error!("{}: {}", self.peer, e);
|
||||
NostrReply::Ok(
|
||||
id,
|
||||
false,
|
||||
NostrReplyPrefix::Restricted,
|
||||
PERSONAL_MSG.to_owned(),
|
||||
)
|
||||
},
|
||||
_ => NostrReply::Ok(id, false, NostrReplyPrefix::Error, format!("{}", e)),
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user