eliminate references to services.globals.config
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
7c6b8b132a
commit
5be07ebc0f
26 changed files with 116 additions and 114 deletions
|
@ -37,7 +37,7 @@ pub(crate) async fn create_invite_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
@ -47,7 +47,7 @@ pub(crate) async fn create_invite_route(
|
|||
}
|
||||
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
|
|
@ -42,7 +42,7 @@ pub(crate) async fn create_join_event_template_route(
|
|||
.await?;
|
||||
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
@ -59,7 +59,7 @@ pub(crate) async fn create_join_event_template_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
|
|
@ -34,7 +34,7 @@ pub(crate) async fn create_knock_event_template_route(
|
|||
.await?;
|
||||
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
@ -51,7 +51,7 @@ pub(crate) async fn create_knock_event_template_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
|
|
@ -20,7 +20,7 @@ pub(crate) async fn get_public_rooms_filtered_route(
|
|||
body: Ruma<get_public_rooms_filtered::v1::Request>,
|
||||
) -> Result<get_public_rooms_filtered::v1::Response> {
|
||||
if !services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.allow_public_room_directory_over_federation
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ pub(crate) async fn get_profile_information_route(
|
|||
body: Ruma<get_profile_information::v1::Request>,
|
||||
) -> Result<get_profile_information::v1::Response> {
|
||||
if !services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.allow_inbound_profile_lookup_federation_requests
|
||||
{
|
||||
|
|
|
@ -309,7 +309,7 @@ async fn handle_edu_typing(
|
|||
origin: &ServerName,
|
||||
typing: TypingContent,
|
||||
) {
|
||||
if !services.globals.config.allow_incoming_typing {
|
||||
if !services.server.config.allow_incoming_typing {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -344,7 +344,7 @@ async fn handle_edu_typing(
|
|||
if typing.typing {
|
||||
let timeout = utils::millis_since_unix_epoch().saturating_add(
|
||||
services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.typing_federation_timeout_s
|
||||
.saturating_mul(1000),
|
||||
|
|
|
@ -268,7 +268,7 @@ pub(crate) async fn create_join_event_v1_route(
|
|||
body: Ruma<create_join_event::v1::Request>,
|
||||
) -> Result<create_join_event::v1::Response> {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
@ -284,7 +284,7 @@ pub(crate) async fn create_join_event_v1_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
@ -316,7 +316,7 @@ pub(crate) async fn create_join_event_v2_route(
|
|||
body: Ruma<create_join_event::v2::Request>,
|
||||
) -> Result<create_join_event::v2::Response> {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
@ -326,7 +326,7 @@ pub(crate) async fn create_join_event_v2_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
|
|
@ -22,7 +22,7 @@ pub(crate) async fn create_knock_event_v1_route(
|
|||
body: Ruma<send_knock::v1::Request>,
|
||||
) -> Result<send_knock::v1::Response> {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(body.origin())
|
||||
|
@ -38,7 +38,7 @@ pub(crate) async fn create_knock_event_v1_route(
|
|||
|
||||
if let Some(server) = body.room_id.server_name() {
|
||||
if services
|
||||
.globals
|
||||
.server
|
||||
.config
|
||||
.forbidden_remote_server_names
|
||||
.contains(&server.to_owned())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue