mirror of
https://github.com/chatmail/core.git
synced 2026-10-01 10:40:52 +03:00
Use UPSERT when saving peerstates
This way there is no need to distinguish between creating and updating peerstate.
This commit is contained in:
+1
-1
@@ -280,7 +280,7 @@ impl Sql {
|
||||
for addr in &addrs {
|
||||
if let Some(ref mut peerstate) = Peerstate::from_addr(context, addr).await? {
|
||||
peerstate.recalc_fingerprint();
|
||||
peerstate.save_to_db(self, false).await?;
|
||||
peerstate.save_to_db(self).await?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user