diff --git a/src/AppDelegate.mm b/src/AppDelegate.mm index 134a457cb880e355890148c7a428ba8ab77ea8f4..7bda6841ab5d318410960c0372084bf3ffe8e18a 100644 --- a/src/AppDelegate.mm +++ b/src/AppDelegate.mm @@ -186,6 +186,15 @@ static void ReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNet if(!shouldNotify) { return; } + bool isIncoming = false; + auto callModel = lrc->getAccountModel() + .getAccountInfo(accountId).callModel.get(); + if(callModel->hasCall(conversationInfo.callId)) { + isIncoming = !callModel->getCall(conversationInfo.callId).isOutgoing; + } + if(!isIncoming) { + return; + } NSString* name = bestIDForConversation(conversationInfo, *lrc->getAccountModel().getAccountInfo(accountId).conversationModel.get()); NSUserNotification* notification = [[NSUserNotification alloc] init];