diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp index a4ea9c999fdedc68386a0bf72cd79a8fd8a130a5..71578a43786981e7a2fb841dba37181ff6f63bac 100644 --- a/src/contactmodel.cpp +++ b/src/contactmodel.cpp @@ -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 {