Cotton code
39 lines · 1.5 KB · RustRaw
//! The message-import core — the port of `packages/import-core/src/*`.//!//! ## Why it is pure, and why that is not a style preference//!//! Every reader has to compute the same `txt2:` id for the same message, or a//! chat imported on one device and re-imported on another is a second copy//! rather than a no-op. That means no reader may reach for anything the others//! do not have. `cotton-core` is pure — no I/O, no clock, no randomness, no//! SQLite, no environment — so the constraint is already the crate's own rule,//! and import lands as `cotton_core::import::*` rather than as a crate of its//! own.//!//! ## What a fingerprint is, and is not//!//! **Content only.** A message's `external_id` is the store's content//! fingerprint (`txt2:` — `cotton_store::protocol::fingerprint::message`),//! computed from the UTC minute, the whitespace-collapsed body and the//! occurrence index among identical same-minute texts. No sender, no phone,//! no direction. Naming a participant later must move no id, or every already//! imported chat duplicates on the next run. Nothing in this module tree//! re-derives a fingerprint; it calls the store's.pub mod adapters;pub use cotton_rules::import::envelope;pub use cotton_rules::import::group;pub mod identity;pub mod ical;pub mod media_plan;pub mod messages_engine;pub mod normalize;pub mod package_readers;pub mod phone;pub mod poll;pub mod post;pub mod report;pub use cotton_rules::import::text;pub mod vcard;pub mod whatsapp_keys;pub mod zip;