Skip to main content

xmtp_proto/
impls.rs

1pub mod update_dedupe;
2
3/// implementations for some generated types
4use crate::xmtp::mls::message_contents::{
5    GroupUpdated, WelcomePointeeEncryptionAeadType, WelcomePointeeEncryptionAeadTypesExtension,
6};
7use std::hash::Hash;
8
9impl Hash for GroupUpdated {
10    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
11        self.initiated_by_inbox_id.hash(state);
12        self.added_inboxes.hash(state);
13        self.removed_inboxes.hash(state);
14        self.metadata_field_changes.hash(state);
15        self.left_inboxes.hash(state);
16        self.added_admin_inboxes.hash(state);
17        self.removed_admin_inboxes.hash(state);
18        self.added_super_admin_inboxes.hash(state);
19        self.removed_super_admin_inboxes.hash(state);
20    }
21}
22
23impl WelcomePointeeEncryptionAeadTypesExtension {
24    pub fn available_types() -> Self {
25        Self {
26            supported_aead_types: vec![WelcomePointeeEncryptionAeadType::Chacha20Poly1305.into()],
27        }
28    }
29}