core_crypto_ffi/bundles/
welcome.rs

1use core_crypto::prelude::ConversationId;
2#[cfg(target_family = "wasm")]
3use wasm_bindgen::prelude::*;
4
5/// see [core_crypto::prelude::WelcomeBundle]
6#[derive(Debug)]
7#[cfg_attr(
8    target_family = "wasm",
9    wasm_bindgen(getter_with_clone),
10    derive(serde::Serialize, serde::Deserialize)
11)]
12#[cfg_attr(not(target_family = "wasm"), derive(uniffi::Record))]
13pub struct WelcomeBundle {
14    /// Identifier of the joined conversation
15    #[cfg_attr(target_family = "wasm", wasm_bindgen(readonly))]
16    pub id: ConversationId,
17    /// New CRL Distribution of members of this group
18    #[cfg_attr(target_family = "wasm", wasm_bindgen(readonly, js_name = crlNewDistributionPoints))]
19    pub crl_new_distribution_points: Option<Vec<String>>,
20}
21
22impl From<core_crypto::prelude::WelcomeBundle> for WelcomeBundle {
23    fn from(
24        core_crypto::prelude::WelcomeBundle {
25            id,
26            crl_new_distribution_points,
27        }: core_crypto::prelude::WelcomeBundle,
28    ) -> Self {
29        let crl_new_distribution_points = crl_new_distribution_points.into();
30        Self {
31            id,
32            crl_new_distribution_points,
33        }
34    }
35}