feat: Add Meowlnir invite interception support

Co-authored-by: Jade Ellis <jade@ellis.link>
This commit is contained in:
timedout
2026-01-05 01:19:11 +00:00
committed by Jade Ellis
parent a83c1f1513
commit 0956779802
8 changed files with 265 additions and 77 deletions
+16 -1
View File
@@ -1,3 +1,4 @@
mod antispam;
mod appservice;
mod data;
mod dest;
@@ -12,7 +13,9 @@ use std::{
use async_trait::async_trait;
use conduwuit::{
Result, Server, debug, debug_warn, err, error,
Result, Server,
config::MeowlnirConfig,
debug, debug_warn, err, error,
smallvec::SmallVec,
utils::{ReadyExt, TryReadyExt, available_parallelism, math::usize_from_u64_truncated},
warn,
@@ -334,6 +337,18 @@ impl Service {
appservice::send_request(client, registration, request).await
}
/// Sends a request to the chosen antispam configuration
pub async fn send_meowlnir_antispam_request<T>(
&self,
config: &MeowlnirConfig,
request: T,
) -> Result<Option<T::IncomingResponse>>
where
T: OutgoingRequest + Debug + Send,
{
antispam::send_meowlnir_request(&self.services.client.appservice, config, request).await
}
/// Clean up queued sending event data
///
/// Used after we remove an appservice registration or a user deletes a push