diff options
Diffstat (limited to '')
| -rw-r--r-- | src/roster.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/roster.rs b/src/roster.rs new file mode 100644 index 0000000..13aed19 --- /dev/null +++ b/src/roster.rs @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden> +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use std::collections::HashMap; + +use jid::BareJID; +use reactive_stores::Store; + +use crate::contact::MacawContact; + +#[derive(Store, Clone)] +pub struct Roster { + #[store(key: BareJID = |(jid, _)| jid.clone())] + contacts: HashMap<BareJID, MacawContact>, +} + +impl Roster { + pub fn new() -> Self { + Self { + contacts: HashMap::new(), + } + } +} |
