chore: Fix formatting
This commit is contained in:
parent
f83238df78
commit
45872ede7a
3 changed files with 24 additions and 17 deletions
|
@ -967,9 +967,9 @@
|
|||
#rocksdb_compaction_ioprio_idle = true
|
||||
|
||||
# Enables RocksDB compaction. You should never ever have to set this
|
||||
# option to false. If you for some reason find yourself needing to use this
|
||||
# option as part of troubleshooting or a bug, please reach out to us in
|
||||
# the conduwuit Matrix room with information and details.
|
||||
# option to false. If you for some reason find yourself needing to use
|
||||
# this option as part of troubleshooting or a bug, please reach out to us
|
||||
# in the conduwuit Matrix room with information and details.
|
||||
#
|
||||
# Disabling compaction will lead to a significantly bloated and
|
||||
# explosively large database, gradually poor performance, unnecessarily
|
||||
|
|
|
@ -614,24 +614,31 @@ fn custom_room_id_check(services: &Services, custom_room_id: &str) -> Result<Own
|
|||
"Custom room ID contains an unexpected `:` which is not allowed.",
|
||||
));
|
||||
}
|
||||
} else if custom_room_id.starts_with('!'){
|
||||
} else if custom_room_id.starts_with('!') {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Room ID is prefixed with !, but is not fully qualified. You likely did not want this."));
|
||||
"Room ID is prefixed with !, but is not fully qualified. You likely did not want \
|
||||
this.",
|
||||
));
|
||||
} else {
|
||||
room_id = format!("!{custom_room_id}:{server_name}");
|
||||
}
|
||||
OwnedRoomId::parse(room_id)
|
||||
.map_err(Into::into)
|
||||
.and_then(
|
||||
|full_room_id| {
|
||||
if full_room_id.server_name().expect("failed to extract server name from room ID") != server_name {
|
||||
Err(Error::BadRequest(ErrorKind::InvalidParam, "Custom room ID must be on this server."))
|
||||
.and_then(|full_room_id| {
|
||||
if full_room_id
|
||||
.server_name()
|
||||
.expect("failed to extract server name from room ID")
|
||||
!= server_name
|
||||
{
|
||||
Err(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Custom room ID must be on this server.",
|
||||
))
|
||||
} else {
|
||||
Ok(full_room_id)
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
.inspect(|full_room_id| {
|
||||
debug_info!(?full_room_id, "Full custom room ID");
|
||||
})
|
||||
|
|
|
@ -1130,9 +1130,9 @@ pub struct Config {
|
|||
pub rocksdb_compaction_ioprio_idle: bool,
|
||||
|
||||
/// Enables RocksDB compaction. You should never ever have to set this
|
||||
/// option to false. If you for some reason find yourself needing to use this
|
||||
/// option as part of troubleshooting or a bug, please reach out to us in
|
||||
/// the conduwuit Matrix room with information and details.
|
||||
/// option to false. If you for some reason find yourself needing to use
|
||||
/// this option as part of troubleshooting or a bug, please reach out to us
|
||||
/// in the conduwuit Matrix room with information and details.
|
||||
///
|
||||
/// Disabling compaction will lead to a significantly bloated and
|
||||
/// explosively large database, gradually poor performance, unnecessarily
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue