mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Fix when to verify events
This commit is contained in:
parent
f79185770b
commit
461c2d3e33
@ -188,7 +188,7 @@ impl WebSocketService {
|
|||||||
|
|
||||||
let event_flags = event_flags(&event, &user).await;
|
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)
|
// 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)).into());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user