Skip to content
Snippets Groups Projects
Commit 8ba843e1 authored by Moritz Brunner's avatar Moritz Brunner Committed by Philippe Gorley
Browse files

contactmodel: hang up call if contact gets deleted


Hang up call when contact gets removed during call

Change-Id: Id02abeace50030048055a304dfc961d83200b51e
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 8d4c642e
No related branches found
No related tags found
No related merge requests found
......@@ -309,6 +309,11 @@ ContactModel::removeContact(const std::string& contactUri, bool banned)
emitContactRemoved = true;
}
}
// hang up calls with the removed contact as peer
try{
auto callinfo = owner.callModel->getCallFromURI(contactUri, true);
owner.callModel->hangUp(callinfo.id);
} catch (std::out_of_range& e){}
if (emitContactRemoved) {
emit contactRemoved(contactUri);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment