fix(CoreHandlers): do not display notification on call received when auto answer is enabled with no delay

This commit is contained in:
Ronan Abhamon 2018-04-16 11:47:48 +02:00
parent a432a9d4e2
commit 7f42542deb

View file

@ -102,7 +102,13 @@ void CoreHandlers::onCallStateChanged (
) {
emit callStateChanged(call, state);
if (call->getState() == linphone::CallStateIncomingReceived)
SettingsModel *settingsModel = CoreManager::getInstance()->getSettingsModel();
if (
call->getState() == linphone::CallStateIncomingReceived && (
!settingsModel->getAutoAnswerStatus() ||
settingsModel->getAutoAnswerDelay() > 0
)
)
App::getInstance()->getNotifier()->notifyReceivedCall(call);
}