Commit b3d97865 authored by Libin Lu's avatar Libin Lu

fix promise error

parent 5658029f
......@@ -211,7 +211,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
}
@ReactMethod
public void subscribeToTopic(String topic){
public void subscribeToTopic(String topic, Promise promise){
try {
FirebaseMessaging.getInstance().subscribeToTopic(topic);
promise.resolve(null);
......@@ -222,7 +222,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
}
@ReactMethod
public void unsubscribeFromTopic(String topic){
public void unsubscribeFromTopic(String topic, Promise promise){
try {
FirebaseMessaging.getInstance().unsubscribeFromTopic(topic);
promise.resolve(null);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment