SOURCE_URL: https://majikah.solutions/products/majik-message/docs/threads-documentation --- title: "Persistent Message Threads" id: "threads-documentation" group: "majik-message" type: "products" version: "1.3.0" lastUpdated: "2026-03-11T00:00:00.000Z" difficulty: "Intermediate" time: "10-15 minutes" tags: [threads, persistent-messages, hash-chain, immutable, verification, post-quantum, ml-kem, consensus-deletion, audit-trail, rich-text, markdown, attachments, file-vault, yara, magika, file-scanning, threat-detection] --- # Persistent Message Threads > Learn how to create, manage, and verify persistent message threads with post-quantum encryption, rich text formatting, YARA-scanned file attachments, and cryptographic hash-chain security. ## Overview Threads are persistent, tamper-resistant message conversations that maintain a permanent, cryptographically-verified history using SHA-256 hash chains and ML-KEM-768 (FIPS-203) post-quantum encryption. Unlike self-destructing chat messages, thread messages are immutable and stored with hash-chain integrity verification — similar to blockchain design but not cryptocurrency-related. Messages support rich text Markdown formatting and file attachments. Every file attached to a thread is automatically scanned for threats in your browser using YARA pattern matching and Google's Magika content-type detector before it can be encrypted or uploaded — no bytes leave your device during scanning. Thread deletion requires N-of-N consensus from all participants. Perfect for important discussions, formal communications, legal/contractual records, and audit trails. ### Understanding Persistent Threads Threads in Majik Message are fundamentally different from regular chats. While chat messages auto-expire after 24 hours (ephemeral, non-chained), thread messages are permanent and immutable by design. Each message is post-quantum encrypted with ML-KEM-768 + AES-256-GCM and cryptographically hashed, linked to the previous message using a SHA-256 hash chain — a technique inspired by blockchain design but without any cryptocurrency or Web3 technology. Messages support rich text Markdown formatting and file attachments, making threads behave like a secure, encrypted email system. Every attachment is automatically scanned for threats in your browser before encryption using YARA and Google's Magika — the same scanner used across the rest of Majik Message's file pipeline. Thread data is stored persistently in Supabase/PostgreSQL and archived in Cloudflare R2. Threads cannot be deleted unless all participants approve or the owner closes the thread, ensuring accountability and data integrity. > **NOTE:** Not Blockchain/Crypto: Majik Message threads use SHA-256 hash-chain verification similar to blockchain technology, but this is purely for message integrity. There is no cryptocurrency, tokens, mining, or Web3 involvement — just cryptographic security for your messages. ### Threads vs. Chats: Key Differences Chats: Self-destructing ephemeral messages that expire after 24 hours (stored in Redis, non-chained integrity model). Support emoji and GIFs. Great for casual, temporary conversations. Threads: Persistent messages that remain permanently (stored in Supabase + R2, SHA-256 hash-chain integrity). Support rich text Markdown formatting and YARA-scanned file attachments. Tamper-resistant history. Require N-of-N approval from all participants to delete. Best for important discussions, formal communications, contracts, or anything requiring a permanent, verifiable record. Both use ML-KEM-768 + AES-256-GCM encryption. > **NOTE:** Access threads in the Threads tab from the top navigation bar. Make sure you're signed in to your Majikah Account and have an active registered identity. ### Cryptographic Hash-Chain Message Integrity Every message in a thread contains a SHA-256 cryptographic hash of the previous message, creating an unbreakable verification chain: H_i = SHA-256(Payload_i || H_{i-1}). If any message is tampered with, altered, or removed, the chain breaks and verification fails. This hash-chain technique is inspired by blockchain design principles but serves only to protect message integrity — there's no cryptocurrency or distributed ledger involved. You can verify any thread's integrity at https://message.majikah.solutions/threads/validate ### Messages Are Immutable > ⚠️ **WARNING:** Once sent, thread messages cannot be edited, changed, or deleted. This is by design to maintain integrity and accountability. Always review your message carefully before sending — including any attached files and formatting. ### Create a New Thread 1. **Open Thread Creation** *Navigate to Threads* - Go to the Threads tab in the top navigation bar - Click the plus (+) icon in the upper right corner (New Thread button) - A dialog window will appear 2. **Assign Participants** *Select recipients from your contacts* - Choose recipients from your contact directory - All recipients must be registered online to use threads - Important: Participants cannot be changed after creation — this protects the hash chain integrity and ensures attachments are encrypted for the correct set of recipients from the start - If you make a mistake, you can delete an empty thread and create a new one 3. **Set Thread Topic (Optional)** *Give your thread a subject or label* - Enter a topic or label for the thread (e.g., 'Project Alpha Discussion', 'Q4 Planning') - This field is optional but recommended for organization - You can change the topic later at any time 4. **Create Thread** - Click Create to finalize the thread - The thread is now created and visible to all participants - You can now start adding messages and attachments to the thread > **NOTE:** Empty threads (threads with no messages) can be deleted by the owner at any time without requiring approval from other participants. ### Add a Message to a Thread 1. **Open the Thread** *Select the thread you want to message in* - In the Threads tab, find the thread from your list - Click on the thread to open it - The Thread Viewer panel will display with the message history 2. **Start New Message** *Access the message composer* - In the Thread Viewer panel, click the plus (+) icon in the upper right corner (New Message button) - A dialog will open with the message composer 3. **Compose Your Message** *Write and format your encrypted message* - Enter a subject for this specific message (optional) - Write your message in the rich text editor — Markdown formatting is fully supported - Use Markdown syntax for headings, bold, italic, lists, code blocks, blockquotes, links, and more - A live preview renders your formatting as you type so you can see exactly how it will appear to recipients - The formatted message is encrypted as-is with ML-KEM-768 + AES-256-GCM when you send it - Review carefully — messages cannot be edited after sending 4. **Attach Files (Optional)** *Add YARA-scanned, encrypted file attachments* - Use the attachment panel in the composer to add files to your message - Drop files onto the attachment drop zone or click to browse — files are immediately queued and scanned - Each file is automatically scanned with YARA and Google's Magika before encryption begins — a pulsing Scanning… badge appears on each pending file row - Files that fail the scan (score below 70, flagged, or scan error) are blocked and cannot be attached — a red Scan Blocked Notice explains the reason - Files that pass the scan automatically proceed to encryption for all thread participants - In compose mode, a green Ready badge appears on each successfully encrypted file — these will be uploaded when you send the message - Attached files are stored as permanent files in your Majikah cloud storage and count toward your 500 MB permanent storage quota 5. **Send or Save Message** *Multiple options available* - Ensure all attachments show a green Ready badge before sending — the Send button reflects pending attachment state - Click Send to add the message to the thread and extend the hash chain - Or use quick download buttons to save encrypted message locally: - Copy to Clipboard: Save encrypted text for pasting elsewhere - Save as TXT: Download as a plain text file - Save as JSON: Download with full metadata ### Rich Text Markdown Formatting Thread messages support full Markdown formatting, giving your messages the structure and clarity of a well-formatted email. You can use headings (# H1, ## H2, ### H3) to organize sections, bold (**text**) and italic (*text*) for emphasis, unordered and ordered lists for structured information, code blocks (``` ``` ```) for technical content, blockquotes (>) for referencing prior context, inline code (`code`) for short references, and links ([label](url)) for external references. All formatting is rendered for recipients when they view the message — the raw Markdown is encrypted along with the plaintext, so recipients see the formatted version automatically. Because thread messages are immutable, take advantage of the live preview in the composer to verify your formatting looks correct before sending. ### File Attachments You can attach files directly to thread messages using the attachment panel in the composer. Every file goes through an automatic three-stage pipeline entirely on your device: (1) Scan — YARA pattern matching and Google's Magika content-type detection run against the raw file bytes. Files scoring below 70 or matching a dangerous rule are hard-blocked. (2) Encrypt — files that pass are encrypted with ML-KEM-768 + AES-256-GCM for all thread participants. (3) Upload — the encrypted .mjkb binary is uploaded to Majikah cloud storage as a permanent file. Encrypted .mjkb files cannot be attached — they are rejected immediately with an error. All attachment scanning, encryption, and upload happens without sending any plaintext or scan results to Majikah's servers. ### How Attachment Scanning Works The attachment scanner runs the same YARA engine and Magika model used throughout Majik Message's file pipeline. Scanning begins the moment a file is dropped or selected — before any encryption or upload begins. Each pending file row in the attachment panel shows its current state with a status badge: a pulsing Scanning… badge while the scan runs, a green Scan clean badge with a score pill (e.g. 98/100) when it passes, or a red Threat detected / amber Score too low badge when blocked. A Scan Blocked Notice appears below any blocked file explaining the exact reason — number of YARA rules matched, score, or scan failure. Blocked files cannot be encrypted or uploaded and must be removed from the queue. The Confirm/Upload button and the composer's Send action both remain gated until all pending attachments have either passed their scan or been removed. ### Attachment Scan Outcome Reference | Scan Phase | Badge | Upload Blocked? | What to Do | | --- | --- | --- | --- | | Scanning… | Pulsing amber Scanning… | Yes — Confirm/Send gated | Wait for scan to complete | | Clean (score ≥ 70) | Green Scan clean + score pill | No — proceeds to encryption | File auto-encrypts; Ready badge appears | | Flagged (score < 70) | Red Threat detected | Yes — hard block | Remove the file | | Score too low (< 70, not explicitly flagged) | Amber Score too low | Yes — blocked | Remove the file | | Scan error | Amber Scan failed | Yes — blocked | Remove and re-add the file | *Caption: How scan results affect the attachment queue in compose mode* > **NOTE:** Attachment scanning is 100% local. The YARA engine and Magika model run as WASM/JavaScript modules in your browser. No file bytes, scan results, or filenames are transmitted during the scanning phase. ### Attachments Use Permanent Storage Quota > ⚠️ **WARNING:** Every file attached to a thread message is stored as a permanent file and counts toward your 500 MB free storage quota. There is no option to attach temporary files to thread messages. Check your available quota in File Vault → My Files before attaching large files to avoid a failed upload mid-send. ### Downloading Attachments Thread participants can download attachments directly from the thread message view. Downloading an attachment from within a thread gives you the raw .mjkb encrypted binary — the same format as downloading from My Files. Take the downloaded .mjkb to the File Vault → Decrypt mode to recover the original file. Only authorized thread participants have access to download the binary — anyone outside the thread who somehow obtained it would still need the correct Majik Message account to decrypt its contents. ### Deleting Attachments Affects All Participants > ⚠️ **WARNING:** Thread attachments can be managed from the File Vault → My Files → Attachments tab. If you delete an attachment from My Files, the file is permanently removed from cloud storage. All thread participants will lose the ability to download that attachment from the thread. The message record in the thread log will still exist and the hash chain remains intact, but the file itself will no longer be retrievable. Be cautious when deleting files from the Attachments tab — coordinate with participants before removing shared files. ### Collaborative Deletion: N-of-N Consensus Majik Message uses a consensus-driven deletion model for threads. Unlike traditional messaging apps that allow unilateral 'delete for everyone,' our system requires approval from all participants before a thread is deleted. This ensures no single participant can destroy a shared record without agreement. Thread deletion is a deliberate, multi-step process that includes an encrypted archive and 72-hour recovery window. ### Request Thread Deletion 1. **Initiate Deletion Request** *Start the consensus process* - Open the thread in the Thread Viewer - Click the trash icon (Request Deletion button) - Confirm your request - The thread status changes to PENDING_DELETION - All participants are notified of your deletion request 2. **Await Participant Approval** *All participants must consent* - Each participant must individually approve the deletion - Thread remains fully accessible during pending state - The thread status displays how many approvals remain - Only when all participants (N of N) approve does deletion proceed 3. **Deletion Execution** *What happens when consensus is reached* - Thread is encrypted with ML-KEM-768 and uploaded as an archive to Cloudflare R2 storage - Download links are sent to all participants via email - Thread messages and headers are deleted from Supabase/PostgreSQL - After 72 hours, the R2 archive is permanently and irreversibly deleted - Note: attachment files stored in each participant's My Files are not automatically deleted — manage these separately from File Vault → My Files → Attachments > **NOTE:** Owner Privilege: Thread owners can immediately delete threads by closing them with auto-delete enabled. This bypasses the N-of-N consensus requirement but still archives the thread to Cloudflare R2 for 72 hours. All participants receive encrypted download links regardless of deletion method. ### Revoke a Deletion Request 1. **Revoke Approval** *Remove your deletion vote* - Click the hand/stop icon in the upper right corner (Cancel Deletion button) - This button only appears if you've already requested deletion - Confirm the revocation - Your approval is removed from the deletion request 2. **Updated Status** - If you were the only one requesting deletion, status returns to ONGOING - If others still have pending requests, status remains PENDING_DELETION - Thread remains active and accessible ### Verify Thread Integrity 1. **Access Validation Tool** *Use the web-based validator* - Go to https://message.majikah.solutions/threads/validate - This is Majikah's official thread validation service - Works with downloaded thread logs from deletion notification emails 2. **Prepare for Validation** *Set up your account (if viewing messages)* - If you want to preview decrypted messages: - Make sure you have the correct seed phrase account set up - Authenticate with the account that was a participant in the thread - Set this account as your active identity - If you only need to verify hash-chain integrity (not read messages), authentication isn't required 3. **Import Thread Log** *Upload the JSON file* - Click Import or drag-and-drop the thread log JSON file - The file is the encrypted export from the deletion email - Processing begins automatically 4. **Review Validation Results** *Check thread integrity and stats* - Thread Statistics: Total messages, participants, date range - Hash Chain Validation: SHA-256 cryptographic integrity check (pass/fail) - Tamper Detection: Any modified or corrupted messages are flagged - Message Preview: If authenticated, view decrypted message content with full Markdown rendering - Verification Certificate: Download proof of validation > **NOTE:** Thread validation happens entirely in your browser. The encrypted log file is never uploaded to Majikah servers. Only you can decrypt and view the messages if you have the correct seed phrase account. ### How Hash-Chain Verification Works Each message contains a SHA-256 hash of its content concatenated with the hash of the previous message, creating a linked chain: H_i = SHA-256(Payload_i || H_{i-1}). The validator checks: (1) Each message's individual hash matches its content, (2) Each message correctly links to the previous message's hash, (3) The first message links to the thread's creation hash, (4) No gaps or missing messages in the chain. If any message has been tampered with, the hash chain breaks and verification fails, making tampering immediately detectable. This technique is inspired by blockchain technology but is used purely for message verification — no cryptocurrency or Web3 technology is involved. ### Quick Reference: Thread Actions | Action | Location | Button/Icon | Permission Required | | --- | --- | --- | --- | | Create Thread | Threads Tab | Plus (+) icon (top right) | Any authenticated user | | Add Message | Thread Viewer | Plus (+) icon | Any participant, thread must be open | | Format message (Markdown) | Thread Viewer → Composer | Rich text editor toolbar | Any participant composing a message | | Attach a file | Thread Viewer → Composer → Attachment panel | Drop zone or browse | Any participant (requires YARA scan pass + available quota) | | View attachment scan result | Composer → Attachment panel → file row | Scan badge / score pill | Any participant adding an attachment | | Download attachment (.mjkb) | Thread Viewer → Message | Download button on attachment | Thread participants only | | Decrypt downloaded attachment | File Vault → Decrypt mode | Drop .mjkb onto drop zone | Active account must be a thread participant | | Manage attachments | File Vault → My Files → Attachments tab | File row actions | File owner (uploader) | | Rename Thread | Thread Viewer | Pencil/edit icon | Any participant | | Close Thread | Thread Viewer | Check icon | Thread owner only | | Request Deletion | Thread Viewer | Trash icon | Any participant | | Cancel Deletion | Thread Viewer | Hand/stop icon | User who requested deletion | | Validate Thread | Web validator | Import button | Anyone with JSON file | *Caption: Common thread management tasks and requirements* ### Understanding Thread Status ONGOING: Thread is active, messages and attachments can be added. PENDING_DELETION: At least one participant has requested deletion, but not all have approved yet. MARKED_FOR_DELETION: All participants have approved (N-of-N consensus reached); thread will be archived to R2 and deleted from Supabase. CLOSED: Thread is closed by owner; no new messages or attachments can be added, but history remains visible unless auto-deleted. > **NOTE:** Download links in deletion notification emails are valid for 72 hours. After this window, the Cloudflare R2 archive is permanently and irreversibly deleted. Make sure to download your thread history within this timeframe. ### Privacy and Encryption All thread messages — including rich text Markdown content and attachment metadata — are encrypted with ML-KEM-768 + AES-256-GCM at rest in Supabase/PostgreSQL. Majikah never stores decrypted messages and has no ability to access message content — the relay only sees encrypted payloads routed by 2-byte truncated public key hashes. Attachments are stored as encrypted .mjkb binaries in Majikah's R2 storage. Attachment scanning happens entirely in your browser before any bytes leave your device — YARA and Magika run as local WASM/JavaScript modules with no network calls. When you download a thread log, it remains encrypted. Only participants with the correct seed phrase accounts can decrypt and read the messages. The validation tool decrypts messages locally in your browser — nothing is sent to Majikah servers. ### Analytics & Retained Metadata After Deletion After a thread is deleted, Majikah retains only minimal, non-identifying metadata for internal analytics: message count per thread, participant 2-byte truncated public key addresses (not full fingerprints), and thread creation/deletion timestamps. All message bodies (plaintext and ciphertext), Markdown content, thread topics, full fingerprints, and user display names are permanently purged. Attachment files stored in individual participants' My Files are not automatically purged on thread deletion — each participant manages their own attachment files. ### When to Use Threads Threads are ideal for: formal business communications requiring records, contract negotiations and agreements with document attachments, project discussions with accountability, important decisions that need documentation, compliance and audit trails, long-term collaborations with shared files, or any conversation where message integrity, formatting, and verification matter. For casual, temporary chats with emoji and GIFs, use the Chats tab instead. ### Participants Cannot Be Changed > ⚠️ **WARNING:** Thread participants are set at creation and cannot be modified. If you need different participants, you must create a new thread. This ensures the integrity of the SHA-256 hash-chain verification system. Attachments are encrypted for all thread participants at upload time — adding participants after the fact would require re-encryption of all existing attachments, which is not supported. ### Thread Management Best Practices Set clear, descriptive topics for easy identification. Use Markdown formatting to write structured, readable messages — especially for long-form content, technical details, or formal communications. Wait for all attachment scan badges to turn green before sending — blocked files prevent upload and will stall the message. Check your storage quota before attaching files to avoid a failed upload. Close threads when the discussion concludes to keep your workspace organized. Download important thread histories before they're deleted — you only have 72 hours after deletion. Verify downloaded logs periodically to ensure integrity. Coordinate with participants before requesting thread deletion so the N-of-N consensus process goes smoothly. If you plan to delete shared attachment files from My Files, notify participants first so they can download what they need.