hide messages from users servers on the forbidden_remote_server_names list

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-15 01:02:52 -05:00
parent 77e0b76408
commit 52693db477
No known key found for this signature in database

View file

@ -237,6 +237,17 @@ pub(crate) async fn ignored_filter(
return None; return None;
} }
if IGNORED_MESSAGE_TYPES.iter().any(is_equal_to!(&pdu.kind))
&& services
.server
.config
.forbidden_remote_server_names
.iter()
.any(is_equal_to!(pdu.sender().server_name()))
{
return None;
}
Some(item) Some(item)
} }