notifications: remove listener for call

This patch removes the listener for the call when handling
git messages, since in this case, the accounts will become
inactive when the extension stops, and the call will be ended."

Change-Id: Ib30e4b1c71252e2169a57a59a083fbc1e129d6cd
diff --git a/Ring/jamiNotificationExtension/Adapter.mm b/Ring/jamiNotificationExtension/Adapter.mm
index dfff8f4..86558d8 100644
--- a/Ring/jamiNotificationExtension/Adapter.mm
+++ b/Ring/jamiNotificationExtension/Adapter.mm
@@ -125,17 +125,6 @@
             }
         }));
 
-    confHandlers.insert(exportable_callback<ConversationSignal::CallConnectionRequest>(
-        [&](const std::string& account_id, const std::string& peer_id, bool hasVideo) {
-            if (Adapter.delegate) {
-                NSString* accountId = [NSString stringWithUTF8String:account_id.c_str()];
-                NSString* peerId = [NSString stringWithUTF8String:peer_id.c_str()];
-                [Adapter.delegate receivedCallConnectionRequestWithAccountId:accountId
-                                                                      peerId:peerId
-                                                                    hasVideo:hasVideo];
-            }
-        }));
-
     confHandlers.insert(exportable_callback<ConversationSignal::ConversationRequestReceived>([&](const std::string& accountId, const std::string& conversationId, std::map<std::string, std::string> metadata) {
         if(Adapter.delegate) {
             NSString* accountIdStr = [NSString stringWithUTF8String:accountId.c_str()];
diff --git a/Ring/jamiNotificationExtension/AdapterDelegate.swift b/Ring/jamiNotificationExtension/AdapterDelegate.swift
index a55c66a..38f7d1d 100644
--- a/Ring/jamiNotificationExtension/AdapterDelegate.swift
+++ b/Ring/jamiNotificationExtension/AdapterDelegate.swift
@@ -29,6 +29,5 @@
     func newInteraction(conversationId: String, accountId: String, message: [String: String])
     func dataTransferEvent(withFileId transferId: String, withEventCode eventCode: Int, accountId: String, conversationId: String, interactionId: String)
     func conversationSyncCompleted(accountId: String)
-    func receivedCallConnectionRequest(accountId: String, peerId: String, hasVideo: Bool)
     func receivedConversationRequest(accountId: String, conversationId: String, metadata: [String: String])
 }
diff --git a/Ring/jamiNotificationExtension/AdapterService.swift b/Ring/jamiNotificationExtension/AdapterService.swift
index 5ea69b1..a39c9b1 100644
--- a/Ring/jamiNotificationExtension/AdapterService.swift
+++ b/Ring/jamiNotificationExtension/AdapterService.swift
@@ -49,7 +49,6 @@
         case fileTransferDone
         case fileTransferInProgress
         case syncCompleted
-        case call
         case invitation
     }
 
@@ -177,13 +176,6 @@
         handler(.syncCompleted, EventData(accountId: accountId))
     }
 
-    func receivedCallConnectionRequest(accountId: String, peerId: String, hasVideo: Bool) {
-        guard let handler = self.eventHandler else {
-            return
-        }
-        handler(.call, EventData(accountId: accountId, jamiId: peerId, content: "\(hasVideo)"))
-    }
-
     func receivedConversationRequest(accountId: String, conversationId: String, metadata: [String: String]) {
         guard let handler = self.eventHandler else {
             return
diff --git a/Ring/jamiNotificationExtension/NotificationService.swift b/Ring/jamiNotificationExtension/NotificationService.swift
index 3d1e57b..98f9ccb 100644
--- a/Ring/jamiNotificationExtension/NotificationService.swift
+++ b/Ring/jamiNotificationExtension/NotificationService.swift
@@ -141,7 +141,7 @@
                         handleCall(peerId, "\(hasVideo)")
                         return
                     case .gitMessage:
-                        self.handleGitMessage(handleCall: handleCall)
+                        self.handleGitMessage()
                     case .unknown:
                         break
                     }
@@ -159,7 +159,7 @@
         finish()
     }
 
-    private func handleGitMessage(handleCall: @escaping (String, String) -> Void) {
+    private func handleGitMessage() {
         /// check if account already acive
         guard !self.accountIsActive else { return }
         self.accountIsActive = true
@@ -183,8 +183,6 @@
                 self.verifyTasksStatus()
             case .fileTransferInProgress:
                 self.numberOfFiles += 1
-            case .call:
-                handleCall(eventData.jamiId, eventData.content)
             case .invitation:
                 self.syncCompleted = true
                 self.numberOfMessages += 1