Spacing/formatting adjustments.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -38,6 +38,7 @@ pub async fn make_user_admin(&self, user_id: &UserId) -> Result {
|
|||||||
{
|
{
|
||||||
return Err!(debug_warn!("User is already joined in the admin room"));
|
return Err!(debug_warn!("User is already joined in the admin room"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if self
|
if self
|
||||||
.services
|
.services
|
||||||
.state_cache
|
.state_cache
|
||||||
@@ -132,6 +133,7 @@ pub async fn make_user_admin(&self, user_id: &UserId) -> Result {
|
|||||||
.config
|
.config
|
||||||
.admin_room_tag
|
.admin_room_tag
|
||||||
.as_str();
|
.as_str();
|
||||||
|
|
||||||
if !room_tag.is_empty() {
|
if !room_tag.is_empty() {
|
||||||
if let Err(e) = self
|
if let Err(e) = self
|
||||||
.set_room_tag(&room_id, user_id, room_tag)
|
.set_room_tag(&room_id, user_id, room_tag)
|
||||||
|
|||||||
@@ -428,6 +428,7 @@ impl Service {
|
|||||||
.services
|
.services
|
||||||
.write()
|
.write()
|
||||||
.expect("locked for writing");
|
.expect("locked for writing");
|
||||||
|
|
||||||
let weak = services.map(Arc::downgrade);
|
let weak = services.map(Arc::downgrade);
|
||||||
*receiver = weak;
|
*receiver = weak;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ async fn get_auth_chain_outer(
|
|||||||
let auth_chain = self
|
let auth_chain = self
|
||||||
.get_auth_chain_inner(room_id, event_id)
|
.get_auth_chain_inner(room_id, event_id)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
self.cache_auth_chain_vec(vec![shortid], auth_chain.as_slice());
|
self.cache_auth_chain_vec(vec![shortid], auth_chain.as_slice());
|
||||||
debug!(
|
debug!(
|
||||||
?event_id,
|
?event_id,
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ impl crate::Service for Service {
|
|||||||
.read()
|
.read()
|
||||||
.expect("locked for reading")
|
.expect("locked for reading")
|
||||||
.len();
|
.len();
|
||||||
|
|
||||||
writeln!(out, "federation_handletime: {federation_handletime}")?;
|
writeln!(out, "federation_handletime: {federation_handletime}")?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ impl Service {
|
|||||||
} else {
|
} else {
|
||||||
(state_ids_compressed, Arc::new(CompressedState::new()))
|
(state_ids_compressed, Arc::new(CompressedState::new()))
|
||||||
};
|
};
|
||||||
|
|
||||||
self.services
|
self.services
|
||||||
.state_compressor
|
.state_compressor
|
||||||
.save_state_from_diff(
|
.save_state_from_diff(
|
||||||
|
|||||||
@@ -86,7 +86,6 @@ pub async fn create_hash_and_sign_event(
|
|||||||
.saturating_add(uint!(1));
|
.saturating_add(uint!(1));
|
||||||
|
|
||||||
let mut unsigned = unsigned.unwrap_or_default();
|
let mut unsigned = unsigned.unwrap_or_default();
|
||||||
|
|
||||||
if let Some(state_key) = &state_key {
|
if let Some(state_key) = &state_key {
|
||||||
if let Ok(prev_pdu) = self
|
if let Ok(prev_pdu) = self
|
||||||
.services
|
.services
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ impl Service {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(_, event)| event)
|
.map(|(_, event)| event)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
futures.push(self.send_events(dest.clone(), new_events_vec));
|
futures.push(self.send_events(dest.clone(), new_events_vec));
|
||||||
} else {
|
} else {
|
||||||
statuses.remove(dest);
|
statuses.remove(dest);
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ impl Services {
|
|||||||
|
|
||||||
self.admin
|
self.admin
|
||||||
.set_services(Some(Arc::clone(self)).as_ref());
|
.set_services(Some(Arc::clone(self)).as_ref());
|
||||||
|
|
||||||
super::migrations::migrations(self).await?;
|
super::migrations::migrations(self).await?;
|
||||||
self.manager
|
self.manager
|
||||||
.lock()
|
.lock()
|
||||||
@@ -137,6 +138,7 @@ impl Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
debug_info!("Services startup complete.");
|
debug_info!("Services startup complete.");
|
||||||
|
|
||||||
Ok(Arc::clone(self))
|
Ok(Arc::clone(self))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user