mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-01-13 21:16:27 +03:00
refactor: remove unecessery async
This commit is contained in:
parent
df1d19db4b
commit
b8b964cc31
3 changed files with 7 additions and 2 deletions
|
@ -907,7 +907,6 @@ async fn join_room_by_id_helper(
|
||||||
.rooms
|
.rooms
|
||||||
.state_accessor
|
.state_accessor
|
||||||
.user_can_invite(room_id, &user, sender_user, &state_lock)
|
.user_can_invite(room_id, &user, sender_user, &state_lock)
|
||||||
.await
|
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
auth_user = Some(user);
|
auth_user = Some(user);
|
||||||
|
|
|
@ -1530,6 +1530,12 @@ pub async fn create_join_event_template_route(
|
||||||
|
|
||||||
let room_version_id = services().rooms.state.get_room_version(&body.room_id)?;
|
let room_version_id = services().rooms.state.get_room_version(&body.room_id)?;
|
||||||
|
|
||||||
|
let join_authorized_via_users_server = if (services()
|
||||||
|
.rooms
|
||||||
|
.state_cache
|
||||||
|
.is_left(&body.user_id, &body.room_id)
|
||||||
|
.unwrap_or(true)
|
||||||
|
|| services()
|
||||||
.rooms
|
.rooms
|
||||||
.state_cache
|
.state_cache
|
||||||
.is_knocked(&body.user_id, &body.room_id)
|
.is_knocked(&body.user_id, &body.room_id)
|
||||||
|
|
|
@ -308,7 +308,7 @@ impl Service {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn user_can_invite(
|
pub fn user_can_invite(
|
||||||
&self,
|
&self,
|
||||||
room_id: &RoomId,
|
room_id: &RoomId,
|
||||||
sender: &UserId,
|
sender: &UserId,
|
||||||
|
|
Loading…
Reference in a new issue