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 <me@as-cii.com>
This commit is contained in:
Petros Amoiridis 2023-01-25 13:04:33 +02:00
parent db978fcb6c
commit 5d4eb2b7ae
No known key found for this signature in database

View File

@ -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());