Fix when to verify events

This commit is contained in:
Mike Dilger 2024-02-19 16:01:13 +13:00
parent f79185770b
commit 461c2d3e33

View File

@ -188,7 +188,7 @@ impl WebSocketService {
let event_flags = event_flags(&event, &user).await;
if GLOBALS.config.read().await.verify_events {
if !event_flags.author_is_an_authorized_user || GLOBALS.config.read().await.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());