feat: Save the secret to encrypt and decrypt messages. Next: Send it in a 'member added' message.

This commit is contained in:
Hocuri
2025-07-11 15:56:03 +02:00
parent 47bf4da1fe
commit 8653fdbd8e
7 changed files with 74 additions and 14 deletions

View File

@@ -1264,10 +1264,13 @@ CREATE INDEX gossip_timestamp_index ON gossip_timestamp (chat_id, fingerprint);
inc_and_check(&mut migration_version, 134)?;
if dbversion < migration_version {
sql.execute_migration(
"CREATE TABLE symmetric_secrets(
chat_id INTEGER PRIMARY KEY NOT NULL,
symmetric_secret: ",
"CREATE TABLE broadcasts_shared_secrets(
chat_id INTEGER PRIMARY KEY NOT NULL, -- TODO we don't actually need the chat_id
secret TEXT NOT NULL
) STRICT",
migration_version,
)
.await?;
}
let new_version = sql