feat: opt-out of events in the app-server (#11319)

Add `optOutNotificationMethods` in the app-server to opt-out events
based on exact method matching
This commit is contained in:
jif-oai
2026-02-10 18:04:52 +00:00
committed by GitHub
parent 48e415bdef
commit a364dd8b56
15 changed files with 284 additions and 7 deletions
+13 -4
View File
@@ -228,12 +228,21 @@ impl MessageProcessor {
self.outgoing.send_error(request_id, error).await;
return;
} else {
let experimental_api_enabled = params
.capabilities
.as_ref()
.is_some_and(|cap| cap.experimental_api);
let (experimental_api_enabled, opt_out_notification_methods) =
match params.capabilities {
Some(capabilities) => (
capabilities.experimental_api,
capabilities
.opt_out_notification_methods
.unwrap_or_default(),
),
None => (false, Vec::new()),
};
self.experimental_api_enabled
.store(experimental_api_enabled, Ordering::Relaxed);
self.outgoing
.set_opted_out_notification_methods(opt_out_notification_methods)
.await;
let ClientInfo {
name,
title: _title,