feat: encryption_disabled config option
Can be used with ROCKET_ENCRYPTION_DISABLED=true
This commit is contained in:
@@ -319,7 +319,12 @@ impl Rooms {
|
||||
Some,
|
||||
);
|
||||
|
||||
// Is the event allowed?
|
||||
if !match event_type {
|
||||
EventType::RoomEncryption => {
|
||||
// Don't allow encryption events when it's disabled
|
||||
!globals.encryption_disabled()
|
||||
}
|
||||
EventType::RoomMember => {
|
||||
let target_user_id = UserId::try_from(&**state_key).map_err(|_| {
|
||||
Error::BadRequest(
|
||||
|
||||
Reference in New Issue
Block a user