feat: reset all indirect verifications

This commit is contained in:
link2xt
2025-09-09 07:42:46 +00:00
parent 6c24edb40d
commit 2481a0f48e
2 changed files with 14 additions and 1 deletions

View File

@@ -1261,6 +1261,16 @@ CREATE INDEX gossip_timestamp_index ON gossip_timestamp (chat_id, fingerprint);
.await?;
}
inc_and_check(&mut migration_version, 134)?;
if dbversion < migration_version {
// Reset all indirect verifications.
sql.execute_migration(
"UPDATE contacts SET verifier=0 WHERE verifier!=1",
migration_version,
)
.await?;
}
let new_version = sql
.get_raw_config_int(VERSION_CFG)
.await?

View File

@@ -159,7 +159,10 @@ async fn test_key_contacts_migration_verified() -> Result<()> {
INSERT INTO chats_contacts VALUES(10,10,1745609547,0);
"#,
)?)).await?;
t.sql.run_migrations(&t).await?;
STOP_MIGRATIONS_AT
.scope(133, t.sql.run_migrations(&t))
.await?;
// Hidden address-contact can't be looked up.
assert!(