From 785fab16532b8640387c5d5dccbdc46cba159d15 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Tue, 28 Jun 2022 19:39:00 +0100 Subject: [PATCH] ios: remove interval notifications method (#759) --- apps/ios/Shared/AppDelegate.swift | 1 - apps/ios/Shared/Model/SimpleXAPI.swift | 4 ---- apps/ios/SimpleXChat/APITypes.swift | 3 --- 3 files changed, 8 deletions(-) diff --git a/apps/ios/Shared/AppDelegate.swift b/apps/ios/Shared/AppDelegate.swift index c58912dd71..66184591c8 100644 --- a/apps/ios/Shared/AppDelegate.swift +++ b/apps/ios/Shared/AppDelegate.swift @@ -56,7 +56,6 @@ class AppDelegate: NSObject, UIApplicationDelegate { if case .active = m.tokenStatus {} else { m.tokenStatus = .confirmed } try await apiVerifyToken(token: token, nonce: nonce, code: verification) m.tokenStatus = .active - try await apiIntervalNofication(token: token, interval: 20) } catch { if let cr = error as? ChatResponse, case .chatCmdError(.errorAgent(.NTF(.AUTH))) = cr { m.tokenStatus = .expired diff --git a/apps/ios/Shared/Model/SimpleXAPI.swift b/apps/ios/Shared/Model/SimpleXAPI.swift index a40e5c0e48..a9795453eb 100644 --- a/apps/ios/Shared/Model/SimpleXAPI.swift +++ b/apps/ios/Shared/Model/SimpleXAPI.swift @@ -236,10 +236,6 @@ func apiVerifyToken(token: DeviceToken, nonce: String, code: String) async throw try await sendCommandOkResp(.apiVerifyToken(token: token, nonce: nonce, code: code)) } -func apiIntervalNofication(token: DeviceToken, interval: Int) async throws { - try await sendCommandOkResp(.apiIntervalNofication(token: token, interval: interval)) -} - func apiDeleteToken(token: DeviceToken) async throws { try await sendCommandOkResp(.apiDeleteToken(token: token)) } diff --git a/apps/ios/SimpleXChat/APITypes.swift b/apps/ios/SimpleXChat/APITypes.swift index 7b07940416..8d9b06447a 100644 --- a/apps/ios/SimpleXChat/APITypes.swift +++ b/apps/ios/SimpleXChat/APITypes.swift @@ -30,7 +30,6 @@ public enum ChatCommand { case apiDeleteChatItem(type: ChatType, id: Int64, itemId: Int64, mode: CIDeleteMode) case apiRegisterToken(token: DeviceToken, notificationMode: NotificationMode) case apiVerifyToken(token: DeviceToken, nonce: String, code: String) - case apiIntervalNofication(token: DeviceToken, interval: Int) case apiDeleteToken(token: DeviceToken) case apiGetNtfMessage(nonce: String, encNtfInfo: String) case getUserSMPServers @@ -79,7 +78,6 @@ public enum ChatCommand { case let .apiDeleteChatItem(type, id, itemId, mode): return "/_delete item \(ref(type, id)) \(itemId) \(mode.rawValue)" case let .apiRegisterToken(token, notificationMode): return "/_ntf register \(token.cmdString) \(notificationMode.rawValue)" case let .apiVerifyToken(token, nonce, code): return "/_ntf verify \(token.cmdString) \(nonce) \(code)" - case let .apiIntervalNofication(token, interval): return "/_ntf interval \(token.cmdString) \(interval)" case let .apiDeleteToken(token): return "/_ntf delete \(token.cmdString)" case let .apiGetNtfMessage(nonce, encNtfInfo): return "/_ntf message \(nonce) \(encNtfInfo)" case .getUserSMPServers: return "/smp_servers" @@ -128,7 +126,6 @@ public enum ChatCommand { case .apiDeleteChatItem: return "apiDeleteChatItem" case .apiRegisterToken: return "apiRegisterToken" case .apiVerifyToken: return "apiVerifyToken" - case .apiIntervalNofication: return "apiIntervalNofication" case .apiDeleteToken: return "apiDeleteToken" case .apiGetNtfMessage: return "apiGetNtfMessage" case .getUserSMPServers: return "getUserSMPServers"