parent
e0ee03fa6f
commit
1cabc0cac9
|
@ -1219,7 +1219,8 @@ impl CryptoStore for SqliteStore {
|
||||||
) VALUES (?1, ?2, ?3, ?4, ?5)
|
) VALUES (?1, ?2, ?3, ?4, ?5)
|
||||||
ON CONFLICT(user_id, device_id) DO UPDATE SET
|
ON CONFLICT(user_id, device_id) DO UPDATE SET
|
||||||
pickle = excluded.pickle,
|
pickle = excluded.pickle,
|
||||||
shared = excluded.shared
|
shared = excluded.shared,
|
||||||
|
uploaded_key_count = excluded.uploaded_key_count
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.bind(pickle.user_id.as_str())
|
.bind(pickle.user_id.as_str())
|
||||||
|
@ -1612,6 +1613,7 @@ mod test {
|
||||||
.expect("Can't save account");
|
.expect("Can't save account");
|
||||||
|
|
||||||
account.mark_as_shared();
|
account.mark_as_shared();
|
||||||
|
account.update_uploaded_key_count(50);
|
||||||
|
|
||||||
store
|
store
|
||||||
.save_account(account.clone())
|
.save_account(account.clone())
|
||||||
|
@ -1622,6 +1624,10 @@ mod test {
|
||||||
let loaded_account = loaded_account.unwrap();
|
let loaded_account = loaded_account.unwrap();
|
||||||
|
|
||||||
assert_eq!(account, loaded_account);
|
assert_eq!(account, loaded_account);
|
||||||
|
assert_eq!(
|
||||||
|
account.uploaded_key_count(),
|
||||||
|
loaded_account.uploaded_key_count()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|
Loading…
Reference in New Issue