diff --git a/crates/ruma-appservice-api/src/lib.rs b/crates/ruma-appservice-api/src/lib.rs index a9cb2035..701c5ef2 100644 --- a/crates/ruma-appservice-api/src/lib.rs +++ b/crates/ruma-appservice-api/src/lib.rs @@ -96,6 +96,11 @@ pub struct Registration { #[serde(skip_serializing_if = "Option::is_none")] pub rate_limited: Option, + /// Whether the homeserver should send EDUs to the appservice, as per MSC2409 + #[cfg(feature = "unstable-msc2409")] + #[serde(skip_serializing_if = "Option::is_none")] + pub receive_ephemeral: Option, + /// The external protocols which the application service provides (e.g. IRC). #[serde(skip_serializing_if = "Option::is_none")] pub protocols: Option>, @@ -135,6 +140,10 @@ pub struct RegistrationInit { /// The sender is excluded. pub rate_limited: Option, + /// Whether the homeserver should send EDUs to the appservice, as per MSC2409 + #[cfg(feature = "unstable-msc2409")] + pub receive_ephemeral: Option, + /// The external protocols which the application service provides (e.g. IRC). pub protocols: Option>, } @@ -149,8 +158,19 @@ impl From for Registration { sender_localpart, namespaces, rate_limited, + receive_ephemeral, protocols, } = init; - Self { id, url, as_token, hs_token, sender_localpart, namespaces, rate_limited, protocols } + Self { + id, + url, + as_token, + hs_token, + sender_localpart, + namespaces, + rate_limited, + receive_ephemeral, + protocols, + } } }