mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
style: Fix large future clippy errors
This commit is contained in:
@@ -425,7 +425,9 @@ pub async fn full_user_deactivate(
|
||||
// TODO: Redact all messages sent by the user in the room
|
||||
}
|
||||
|
||||
super::update_all_rooms(services, pdu_queue, user_id).await;
|
||||
super::update_all_rooms(services, pdu_queue, user_id)
|
||||
.boxed()
|
||||
.await;
|
||||
for room_id in all_joined_rooms {
|
||||
services.rooms.state_cache.forget(room_id, user_id);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use conduwuit::{
|
||||
};
|
||||
use conduwuit_service::Services;
|
||||
use futures::{
|
||||
StreamExt, TryStreamExt,
|
||||
FutureExt, StreamExt, TryStreamExt,
|
||||
future::{join, join3, join4},
|
||||
};
|
||||
use ruma::{
|
||||
@@ -51,6 +51,7 @@ pub(crate) async fn set_displayname_route(
|
||||
.await;
|
||||
|
||||
update_displayname(&services, &body.user_id, body.displayname.clone(), &all_joined_rooms)
|
||||
.boxed()
|
||||
.await;
|
||||
|
||||
if services.config.allow_local_presence {
|
||||
@@ -149,6 +150,7 @@ pub(crate) async fn set_avatar_url_route(
|
||||
body.blurhash.clone(),
|
||||
&all_joined_rooms,
|
||||
)
|
||||
.boxed()
|
||||
.await;
|
||||
|
||||
if services.config.allow_local_presence {
|
||||
@@ -344,7 +346,9 @@ pub async fn update_displayname(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
update_all_rooms(services, all_joined_rooms, user_id).await;
|
||||
update_all_rooms(services, all_joined_rooms, user_id)
|
||||
.boxed()
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn update_avatar_url(
|
||||
@@ -394,7 +398,9 @@ pub async fn update_avatar_url(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
update_all_rooms(services, all_joined_rooms, user_id).await;
|
||||
update_all_rooms(services, all_joined_rooms, user_id)
|
||||
.boxed()
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn update_all_rooms(
|
||||
|
||||
@@ -137,6 +137,7 @@ pub(crate) async fn upgrade_room_route(
|
||||
Some(&body.room_id),
|
||||
&state_lock,
|
||||
)
|
||||
.boxed()
|
||||
.await?;
|
||||
// Change lock to replacement room
|
||||
drop(state_lock);
|
||||
|
||||
@@ -60,6 +60,7 @@ pub(crate) async fn send_state_event_for_key_route(
|
||||
None
|
||||
},
|
||||
)
|
||||
.boxed()
|
||||
.await?,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::collections::BTreeMap;
|
||||
use axum::extract::State;
|
||||
use axum_client_ip::InsecureClientIp;
|
||||
use conduwuit::{Err, Result};
|
||||
use futures::StreamExt;
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use ruma::{
|
||||
OwnedRoomId,
|
||||
api::{
|
||||
@@ -112,6 +112,7 @@ pub(crate) async fn set_profile_key_route(
|
||||
Some(display_name.to_owned()),
|
||||
&all_joined_rooms,
|
||||
)
|
||||
.boxed()
|
||||
.await;
|
||||
} else if body.key_name == "avatar_url" {
|
||||
let Some(avatar_url) = profile_key_value.as_str() else {
|
||||
@@ -127,7 +128,9 @@ pub(crate) async fn set_profile_key_route(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
update_avatar_url(&services, &body.user_id, Some(mxc), None, &all_joined_rooms).await;
|
||||
update_avatar_url(&services, &body.user_id, Some(mxc), None, &all_joined_rooms)
|
||||
.boxed()
|
||||
.await;
|
||||
} else {
|
||||
services.users.set_profile_key(
|
||||
&body.user_id,
|
||||
@@ -178,7 +181,9 @@ pub(crate) async fn delete_profile_key_route(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
update_displayname(&services, &body.user_id, None, &all_joined_rooms).await;
|
||||
update_displayname(&services, &body.user_id, None, &all_joined_rooms)
|
||||
.boxed()
|
||||
.await;
|
||||
} else if body.key_name == "avatar_url" {
|
||||
let all_joined_rooms: Vec<OwnedRoomId> = services
|
||||
.rooms
|
||||
@@ -188,7 +193,9 @@ pub(crate) async fn delete_profile_key_route(
|
||||
.collect()
|
||||
.await;
|
||||
|
||||
update_avatar_url(&services, &body.user_id, None, None, &all_joined_rooms).await;
|
||||
update_avatar_url(&services, &body.user_id, None, None, &all_joined_rooms)
|
||||
.boxed()
|
||||
.await;
|
||||
} else {
|
||||
services
|
||||
.users
|
||||
|
||||
Reference in New Issue
Block a user