This commit is contained in:
Antonio Scandurra 2022-12-13 11:37:39 +01:00
parent 7e8d9d52d3
commit e2b132ef23

View file

@ -277,12 +277,9 @@ impl Server {
} }
for user_id in contacts_to_update { for user_id in contacts_to_update {
if let Some((busy, contacts)) = db let busy = db.is_user_busy(user_id).await.trace_err();
.is_user_busy(user_id) let contacts = db.get_contacts(user_id).await.trace_err();
.await if let Some((busy, contacts)) = busy.zip(contacts) {
.trace_err()
.zip(db.get_contacts(user_id).await.trace_err())
{
let pool = pool.lock().await; let pool = pool.lock().await;
let updated_contact = contact_for_user(user_id, false, busy, &pool); let updated_contact = contact_for_user(user_id, false, busy, &pool);
for contact in contacts { for contact in contacts {