✂️ Implement message chunking mechanism for NIP-44 size limit compliance

This ensures all messages can be properly encrypted and transmitted regardless of size.

Fixes issue #2
This commit is contained in:
Danny Morabito 2025-03-24 20:14:52 +01:00
parent a4134fa416
commit 89d9dc3cbe
Signed by: dannym
GPG key ID: 7CC8056A5A04557E
4 changed files with 246 additions and 65 deletions

View file

@ -0,0 +1,13 @@
CREATE TABLE event_chunks (
chunk_id INTEGER PRIMARY KEY AUTOINCREMENT,
message_id TEXT NOT NULL,
chunk_index INTEGER NOT NULL,
total_chunks INTEGER NOT NULL,
chunk_data TEXT NOT NULL,
conversation_key TEXT NOT NULL,
created_at INTEGER NOT NULL,
UNIQUE(message_id, chunk_index)
);
CREATE INDEX idx_event_chunks_message_id ON event_chunks(message_id);
CREATE INDEX idx_event_chunks_created_at ON event_chunks(created_at);