remove several services.globals config wrappers
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d60920c728
commit
d3b65af616
12 changed files with 34 additions and 84 deletions
|
@ -25,8 +25,7 @@ pub(crate) async fn send_message_event_route(
|
|||
let appservice_info = body.appservice_info.as_ref();
|
||||
|
||||
// Forbid m.room.encrypted if encryption is disabled
|
||||
if MessageLikeEventType::RoomEncrypted == body.event_type
|
||||
&& !services.globals.allow_encryption()
|
||||
if MessageLikeEventType::RoomEncrypted == body.event_type && !services.config.allow_encryption
|
||||
{
|
||||
return Err!(Request(Forbidden("Encryption has been disabled")));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue