mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-10-03 18:50:45 +00:00
fix: Fix restricted join rules inconsistencies
This commit is contained in:
parent
92e9802340
commit
c9c79fbea6
2 changed files with 16 additions and 9 deletions
|
@ -742,6 +742,7 @@ async fn join_room_by_id_helper_local(
|
|||
.iter()
|
||||
.stream()
|
||||
.any(|restriction_room_id| {
|
||||
trace!("Checking if {sender_user} is joined to {restriction_room_id}");
|
||||
services
|
||||
.rooms
|
||||
.state_cache
|
||||
|
@ -754,6 +755,7 @@ async fn join_room_by_id_helper_local(
|
|||
.state_cache
|
||||
.local_users_in_room(room_id)
|
||||
.filter(|user| {
|
||||
trace!("Checking if {user} can invite {sender_user} to {room_id}");
|
||||
services.rooms.state_accessor.user_can_invite(
|
||||
room_id,
|
||||
user,
|
||||
|
@ -766,6 +768,7 @@ async fn join_room_by_id_helper_local(
|
|||
.await
|
||||
.map(ToOwned::to_owned)
|
||||
} else {
|
||||
trace!("No restriction rooms are joined by {sender_user}");
|
||||
None
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue