1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-10-15 19:42:07 +00:00

ci: check for typos

This commit is contained in:
Matthias Ahouansou 2025-03-24 01:28:42 +00:00
parent 063d13a0e1
commit 2dce87546a
No known key found for this signature in database
20 changed files with 50 additions and 32 deletions

View file

@ -723,7 +723,7 @@ impl Service {
let mut user_ids = Vec::new();
let mut remote_ids = Vec::new();
let mut non_existant_ids = Vec::new();
let mut non_existent_ids = Vec::new();
let mut invalid_users = Vec::new();
for &user in &users {
@ -732,7 +732,7 @@ impl Service {
if user_id.server_name() != services().globals.server_name() {
remote_ids.push(user_id)
} else if !services().users.exists(user_id)? {
non_existant_ids.push(user_id)
non_existent_ids.push(user_id)
} else {
user_ids.push(user_id)
}
@ -767,12 +767,12 @@ impl Service {
markdown_message.push_str("```\n\n");
html_message.push_str("</pre>\n\n");
}
if !non_existant_ids.is_empty() {
if !non_existent_ids.is_empty() {
markdown_message.push_str("The following users do not exist:\n```\n");
html_message.push_str("The following users do not exist:\n<pre>\n");
for non_existant_id in non_existant_ids {
markdown_message.push_str(&format!("{non_existant_id}\n"));
html_message.push_str(&format!("{non_existant_id}\n"));
for non_existent_id in non_existent_ids {
markdown_message.push_str(&format!("{non_existent_id}\n"));
html_message.push_str(&format!("{non_existent_id}\n"));
}
markdown_message.push_str("```\n\n");
html_message.push_str("</pre>\n\n");
@ -962,7 +962,7 @@ impl Service {
.rooms
.alias
.remove_alias(&alias, services().globals.server_user())?;
RoomMessageEventContent::text_plain("Alias removed sucessfully")
RoomMessageEventContent::text_plain("Alias removed successfully")
}
}
};

View file

@ -36,7 +36,7 @@ impl NamespaceRegex {
false
}
/// Checks if this namespace has exlusive rights to a namespace
/// Checks if this namespace has exclusive rights to a namespace
pub fn is_exclusive_match(&self, heystack: &str) -> bool {
if let Some(exclusive) = &self.exclusive {
if exclusive.is_match(heystack) {

View file

@ -80,14 +80,14 @@ pub trait Data: Send + Sync {
fn load_keypair(&self) -> Result<Ed25519KeyPair>;
fn remove_keypair(&self) -> Result<()>;
/// Only extends the cached keys, not moving any verify_keys to old_verify_keys, as if we suddenly
/// recieve requests from the origin server, we want to be able to accept requests from them
/// receive requests from the origin server, we want to be able to accept requests from them
fn add_signing_key_from_trusted_server(
&self,
origin: &ServerName,
new_keys: ServerSigningKeys,
) -> Result<SigningKeys>;
/// Extends cached keys, as well as moving verify_keys that are not present in these new keys to
/// old_verify_keys, so that potnetially comprimised keys cannot be used to make requests
/// old_verify_keys, so that potnetially compromised keys cannot be used to make requests
fn add_signing_key_from_origin(
&self,
origin: &ServerName,

View file

@ -305,7 +305,7 @@ impl Service {
self.config.max_fetch_prev_events
}
/// Allows for the temporary (non-persistant) toggling of registration
/// Allows for the temporary (non-persistent) toggling of registration
pub async fn set_registration(&self, status: bool) {
let mut lock = self.allow_registration.write().await;
*lock = status;
@ -404,7 +404,7 @@ impl Service {
}
/// Filters the key map of multiple servers down to keys that should be accepted given the expiry time,
/// room version, and timestamp of the paramters
/// room version, and timestamp of the parameters
pub fn filter_keys_server_map(
&self,
keys: BTreeMap<String, SigningKeys>,
@ -420,7 +420,7 @@ impl Service {
}
/// Filters the keys of a single server down to keys that should be accepted given the expiry time,
/// room version, and timestamp of the paramters
/// room version, and timestamp of the parameters
pub fn filter_keys_single_server(
&self,
keys: SigningKeys,

View file

@ -69,7 +69,7 @@ impl Service {
/// trust a set of state we got from a remote)
/// 13. Use state resolution to find new room state
/// 14. Check if the event passes auth based on the "current state" of the room, if not soft fail it
// We use some AsyncRecursiveType hacks here so we can call this async funtion recursively
// We use some AsyncRecursiveType hacks here so we can call this async function recursively
#[tracing::instrument(skip(self, value, is_timeline_event, pub_key_map))]
pub(crate) async fn handle_incoming_pdu<'a>(
&self,
@ -1786,7 +1786,7 @@ impl Service {
.expect("Should be valid until year 500,000,000");
debug!(
"The treshhold is {:?}, found time is {:?} for server {}",
"The threshold is {:?}, found time is {:?} for server {}",
ts_threshold, result.valid_until_ts, origin
);

View file

@ -39,7 +39,7 @@ pub struct Service;
impl Service {
/// Attempts to join a room.
/// If the room cannot be joined locally, it attempts to join over federation, soley using the
/// If the room cannot be joined locally, it attempts to join over federation, solely using the
/// specified servers
#[tracing::instrument(skip(self, reason, servers, _third_party_signed))]
pub async fn join_room_by_id(

View file

@ -227,7 +227,7 @@ impl Service {
.as_ref()
{
return Ok(if let Some(cached) = cached {
if is_accessable_child(
if is_accessible_child(
current_room,
&cached.summary.join_rule,
&identifier,
@ -338,7 +338,7 @@ impl Service {
);
}
}
if is_accessable_child(
if is_accessible_child(
current_room,
&response.room.join_rule,
&Identifier::UserId(user_id),
@ -408,7 +408,7 @@ impl Service {
.state_accessor
.allowed_room_ids(join_rule.clone());
if !is_accessable_child(
if !is_accessible_child(
current_room,
&join_rule.clone().into(),
&identifier,
@ -678,8 +678,8 @@ async fn get_stripped_space_child_events(
}
}
/// With the given identifier, checks if a room is accessable
fn is_accessable_child(
/// With the given identifier, checks if a room is accessible
fn is_accessible_child(
current_room: &OwnedRoomId,
join_rule: &SpaceRoomJoinRule,
identifier: &Identifier<'_>,

View file

@ -463,7 +463,7 @@ impl Service {
// Here we don't attempt to join if the previous membership was knock and the
// new one is join, like we do for `/federation/*/invite`, as not only are there
// implementation difficulties due to callers not implementing `Send`, but
// invites we recieve which aren't over `/invite` must have been due to a
// invites we receive which aren't over `/invite` must have been due to a
// database reset or switching server implementations, which means we probably
// shouldn't be joining automatically anyways, since it may surprise users to
// suddenly join rooms which clients didn't even show as being knocked on before.

View file

@ -537,7 +537,7 @@ impl Service {
(
kind.clone(),
Error::bad_database(
"[Push] Event in servernamevent_datas not found in db.",
"[Push] Event in servernamevent_data not found in db.",
),
)
})?,
@ -621,7 +621,7 @@ impl Service {
(
OutgoingKind::Normal(server.clone()),
Error::bad_database(
"[Normal] Event in servernamevent_datas not found in db.",
"[Normal] Event in servernamevent_data not found in db.",
),
)
})?,