Skip to content

Commit d4e4fee

Browse files
committed
chore: Update push token registration and unregistration to use FCM_VOIP type
1 parent 0464d02 commit d4e4fee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

android/src/main/java/com/sendbird/calls/reactnative/module/CallsCommonModule.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.facebook.react.bridge.ReadableArray
55
import com.facebook.react.bridge.ReadableMap
66
import com.facebook.react.bridge.WritableNativeMap
77
import com.sendbird.calls.*
8+
import com.sendbird.calls.internal.PushTokenType
89
import com.sendbird.calls.reactnative.RNCallsInternalError
910
import com.sendbird.calls.reactnative.extension.rejectCalls
1011
import com.sendbird.calls.reactnative.module.listener.CallsDirectCallListener
@@ -106,7 +107,7 @@ class CallsCommonModule(private val root: CallsModule): CommonModule {
106107

107108
override fun registerPushToken(token: String, unique: Boolean, promise: Promise) {
108109
RNCallsLogger.d("[CommonModule] registerPushToken()")
109-
SendBirdCall.registerPushToken(token, unique) { error ->
110+
SendBirdCall.registerPushToken(token, PushTokenType.FCM_VOIP, unique) { error ->
110111
error
111112
?.let {
112113
promise.rejectCalls(it)
@@ -119,7 +120,7 @@ class CallsCommonModule(private val root: CallsModule): CommonModule {
119120

120121
override fun unregisterPushToken(token: String, promise: Promise) {
121122
RNCallsLogger.d("[CommonModule] unregisterPushToken()")
122-
SendBirdCall.unregisterPushToken(token) { error ->
123+
SendBirdCall.unregisterPushToken(token, PushTokenType.FCM_VOIP) { error ->
123124
error
124125
?.let {
125126
promise.rejectCalls(it)

0 commit comments

Comments
 (0)