mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: Apply client-requested timeout to federated key queries
Also parallelised federation calls in related functions
This commit is contained in:
@@ -188,7 +188,7 @@ pub async fn revoke_admin(&self, user_id: &UserId) -> Result {
|
||||
warn!(
|
||||
"Revoking the admin status of {user_id} will not work correctly as they are within \
|
||||
the admins_list config."
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
let Ok(room_id) = self.get_admin_room().await else {
|
||||
|
||||
@@ -406,13 +406,20 @@ impl Service {
|
||||
|
||||
/// Checks whether a given user is an admin of this server
|
||||
pub async fn user_is_admin(&self, user_id: &UserId) -> bool {
|
||||
if self.services.server.config.admins_list.contains(&user_id.to_owned()) {
|
||||
if self
|
||||
.services
|
||||
.server
|
||||
.config
|
||||
.admins_list
|
||||
.contains(&user_id.to_owned())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if self.services.server.config.admins_from_room {
|
||||
if let Ok(admin_room) = self.get_admin_room().await {
|
||||
return self.services
|
||||
return self
|
||||
.services
|
||||
.state_cache
|
||||
.is_joined(user_id, &admin_room)
|
||||
.await;
|
||||
|
||||
Reference in New Issue
Block a user