From 5d4eb2b7ae568132fd7f602e67f5208439d864b4 Mon Sep 17 00:00:00 2001 From: Petros Amoiridis Date: Wed, 25 Jan 2023 13:04:33 +0200 Subject: [PATCH] Push responder and requester to remove_contacts When we ask the server to remove a contact we need to push the requester and responder ids to `remove_contacts` so that when the UI updates, the correct contacts will disappear from the list. Co-Authored-By: Antonio Scandurra --- crates/collab/src/rpc.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/collab/src/rpc.rs b/crates/collab/src/rpc.rs index 92d4935b23..54ffd9a958 100644 --- a/crates/collab/src/rpc.rs +++ b/crates/collab/src/rpc.rs @@ -1966,6 +1966,7 @@ async fn remove_contact( let pool = session.connection_pool().await; // Update outgoing contact requests of requester let mut update = proto::UpdateContacts::default(); + update.remove_contacts.push(responder_id.to_proto()); update .remove_outgoing_requests .push(responder_id.to_proto()); @@ -1975,6 +1976,7 @@ async fn remove_contact( // Update incoming contact requests of responder let mut update = proto::UpdateContacts::default(); + update.remove_contacts.push(requester_id.to_proto()); update .remove_incoming_requests .push(requester_id.to_proto());