Skip to main content

Module rumor

Module rumor 

Source
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§

RumorContext
Context for processing a rumor
RumorEvent
Decrypted NIP-17 rumor event representation.

Enums§

ConversationType
Type of conversation — the transport-specific dimension the shared parser keys off (e.g. who the author is). conversation_id carries the address: an npub for a DM, a channel id for a Community.
RumorProcessingResult
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_at and an optional ms sub-second offset tag. ONE implementation for every transport — DMs and Concord share the exact ms convention AND the anti-abuse clamp.