1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! A contact book for Weirdnet apps.
//!
//! - [`Book`]: who you know, as [`ContactState::Trusted`], [`ContactState::Blocked`] or not at
//! all, a ban list keyed by identity, and your [`PresencePolicy`].
//! - Presence with privacy rules ([`presence`]): everyone online sees your base state (online,
//! away or busy), and only trusted contacts see the detail fields (status line, in-session
//! hint, last seen) that your policy allows. [`presence::view_for`] decides, in one place.
//! - Signed text direct messages and invite cards ([`message`]) with a delivery state, an
//! offline queue and conversations that merge, so two nodes (or your own devices) converge
//! after they were apart.
//! - [`ContactLink`]: a `weirdnet-contact:` link or QR payload that adds someone.
//! - [`Contacts`]: the live state behind one `Mutex`, [`service::ContactsService`] to serve it
//! over [`weirdnet_service`], and [`client`] to send, flush, pull and read presence.
//!
//! An identity here is the transport peer id ([`UserId`]): the service authorizes a caller by
//! the peer the connection proved, and a message must come from the peer that signed it. The
//! crate is app-neutral and keeps nothing on disk: [`Contacts::snapshot`] and
//! [`Contacts::restore`] give the app plain serde data to store as it likes.
//!
//! The relay never carries messages or detail presence; those go node to node. Finding who is
//! online is the job of `weirdnet-presence`.
pub use ;
pub use ;
pub use ;
pub use ContactLink;
pub use ;
pub use ;