Commit f584cc5e authored by Anthony Léonard's avatar Anthony Léonard

trust pending contact if incoming call accepted

If a pending contact is trying to reach us by a call and we accept, it
is then trusted implicitly and thus moved to the "Conversations" list.

Change-Id: Id24e245eeb7bdd002a0a637f4ab450067d2233a0
parent 9afb9fee
......@@ -636,6 +636,14 @@
if (accountInfo_ == nil)
return;
// If we accept a conversation with a non trusted contact, we first accept it
auto convIt = getConversationFromUid(convUid_, *accountInfo_->conversationModel.get());
if (convIt != accountInfo_->conversationModel->allFilteredConversations().end()) {
auto& contact = accountInfo_->contactModel->getContact(convIt->participants[0]);
if (contact.profileInfo.type == lrc::api::profile::Type::PENDING)
accountInfo_->conversationModel->makePermanent(convUid_);
}
auto* callModel = accountInfo_->callModel.get();
callModel->accept(callUid_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment