✂️ 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:
parent
a4134fa416
commit
89d9dc3cbe
4 changed files with 246 additions and 65 deletions
13
migrations/4-createChunksStore.sql
Normal file
13
migrations/4-createChunksStore.sql
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue