summaryrefslogblamecommitdiffstats
path: root/src/roster.rs
blob: 13aed1956f6778236635f1e5dd943fffe0ffbd56 (plain) (tree)
1
2
3
4



                                                      



















                                                   
// 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(),
        }
    }
}