Expand description
Rumor Processing Module
Unified processing for the inner decrypted events of NIP-17 DMs. “Rumors” are the inner events; only the gift-wrap unwrapping happens before this.
§Architecture
Event → Protocol Handler (unwrap) → RumorEvent
↓
process_rumor() [SHARED]
↓
RumorProcessingResult
↓
Storage Handler (protocol-specific)
↓
Emit to UI [SHARED]§Supported Rumor Types
- Text Messages:
Kind::PrivateDirectMessage- Plain text with optional replies - File Attachments:
Kind::from_u16(15)- Encrypted files with metadata - Reactions:
Kind::Reaction- Emoji reactions to messages - Typing Indicators:
Kind::ApplicationSpecificData- Real-time typing status
Structs§
- Rumor
Context - Context for processing a rumor
- Rumor
Event - Decrypted NIP-17 rumor event representation.
Enums§
- Conversation
Type - Type of conversation — the transport-specific dimension the shared parser keys off (e.g. who the
author is).
conversation_idcarries the address: an npub for a DM, a channel id for a Community. - Rumor
Processing Result - Result of processing a rumor
Functions§
- extract_
hash_ from_ blossom_ url - Extract SHA256 hash from a Blossom URL
- process_
rumor - Main rumor processor - protocol agnostic
- resolve_
message_ timestamp - Resolve a message’s ordering timestamp (epoch ms) from its second-resolution
created_atand an optionalmssub-second offset tag. ONE implementation for every transport — DMs and Concord share the exact ms convention AND the anti-abuse clamp.