Nyaaori 2022-12-21 10:42:12 +01:00
parent 7b98741163
commit c86313d4fa
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
15 changed files with 56 additions and 92 deletions

View file

@ -15,10 +15,7 @@ pub struct Service {
}
impl Service {
pub fn get_cached_eventid_authchain<'a>(
&'a self,
key: &[u64],
) -> Result<Option<Arc<HashSet<u64>>>> {
pub fn get_cached_eventid_authchain(&self, key: &[u64]) -> Result<Option<Arc<HashSet<u64>>>> {
self.db.get_cached_eventid_authchain(key)
}

View file

@ -639,7 +639,7 @@ impl Service {
origin,
get_room_state_ids::v1::Request {
room_id: room_id.to_owned(),
event_id: (&*incoming_pdu.event_id).to_owned(),
event_id: (*incoming_pdu.event_id).to_owned(),
},
)
.await

View file

@ -37,7 +37,7 @@ pub trait Data: Send + Sync {
room_id: &RoomId,
) -> Box<dyn Iterator<Item = Result<OwnedServerName>> + 'a>;
fn server_in_room<'a>(&'a self, server: &ServerName, room_id: &RoomId) -> Result<bool>;
fn server_in_room(&self, server: &ServerName, room_id: &RoomId) -> Result<bool>;
/// Returns an iterator of all rooms a server participates in (as far as we know).
fn server_rooms<'a>(

View file

@ -378,7 +378,7 @@ impl Service {
)?;
let server_user = format!("@conduit:{}", services().globals.server_name());
let to_conduit = body.starts_with(&format!("{}: ", server_user));
let to_conduit = body.starts_with(&format!("{server_user}: "));
// This will evaluate to false if the emergency password is set up so that
// the administrator can execute commands as conduit