fix: Stop applying MSC4155 invite filtering to outgoing invites

This commit is contained in:
Erwan Leboucher authored and Ellis Git committed 2026-08-29 13:38:51 +00:00
1 parent 4dc7e06c90
commit c731ec5421
3 files changed
+12 -14

No files matched your search

+5 -6
View File
@@ -49,13 +49,12 @@ pub(crate) async fn invite_user_route(
reason,
..
}) => {
let sender_filter_level = services
// silently drop invites to users the sender has ignored
if services
.users
.invite_filter_level(recipient_user, sender_user)
.await;
if !matches!(sender_filter_level, FilterLevel::Allow) {
// drop invites if the sender has the recipient filtered
.user_is_ignored(recipient_user, sender_user)
.await
{
return Ok(invite_user::v3::Response::new());
}
+6 -8
View File
@@ -156,14 +156,12 @@ pub(crate) async fn create_room_route(
let mut invitees = BTreeSet::new();
for recipient_user in &body.invite {
if !matches!(
services
.users
.invite_filter_level(recipient_user, sender_user)
.await,
FilterLevel::Allow
) {
// drop invites if the creator has them blocked
// silently drop invites to users the creator has ignored
if services
.users
.user_is_ignored(recipient_user, sender_user)
.await
{
continue;
}