From 647cdb2a7007b6c7d08e39900869574dcd359ea4 Mon Sep 17 00:00:00 2001 From: Yurii Zhuk Date: Tue, 12 Mar 2024 15:34:01 +0200 Subject: [PATCH] refactor: refactor PortalClient.registerDevice method --- mobile-sdk/build.gradle | 2 +- .../com/webitel/mobile_sdk/data/portal/WebitelPortalClient.kt | 4 ++-- .../main/java/com/webitel/mobile_sdk/domain/PortalClient.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile-sdk/build.gradle b/mobile-sdk/build.gradle index 54ae89c..083bb54 100644 --- a/mobile-sdk/build.gradle +++ b/mobile-sdk/build.gradle @@ -122,7 +122,7 @@ afterEvaluate { groupId = "com.webitel" artifactId = "mobile-sdk" - version = "0.5.5" + version = "0.5.6" } } } diff --git a/mobile-sdk/src/main/java/com/webitel/mobile_sdk/data/portal/WebitelPortalClient.kt b/mobile-sdk/src/main/java/com/webitel/mobile_sdk/data/portal/WebitelPortalClient.kt index dd83cd7..ce70127 100644 --- a/mobile-sdk/src/main/java/com/webitel/mobile_sdk/data/portal/WebitelPortalClient.kt +++ b/mobile-sdk/src/main/java/com/webitel/mobile_sdk/data/portal/WebitelPortalClient.kt @@ -156,8 +156,8 @@ internal class WebitelPortalClient( } - override fun registerFCMToken(token: String, callback: CallbackListener) { - authRepository.registerFcm(token, callback) + override fun registerDevice(pushToken: String, callback: CallbackListener) { + authRepository.registerFcm(pushToken, callback) } diff --git a/mobile-sdk/src/main/java/com/webitel/mobile_sdk/domain/PortalClient.kt b/mobile-sdk/src/main/java/com/webitel/mobile_sdk/domain/PortalClient.kt index c9dd744..c8d67a0 100644 --- a/mobile-sdk/src/main/java/com/webitel/mobile_sdk/domain/PortalClient.kt +++ b/mobile-sdk/src/main/java/com/webitel/mobile_sdk/domain/PortalClient.kt @@ -18,9 +18,9 @@ interface PortalClient { fun setAccessToken(token: String, callback: CallbackListener) /** - * For FCM, the encryption key used to encrypt push messages. Set empty if you want to unsubscribe. + * Register device PUSH subscription * */ - fun registerFCMToken(token: String, callback: CallbackListener) + fun registerDevice(pushToken: String, callback: CallbackListener) fun handleFCMNotification(data: Map)