[messaging] Correctly resolve the promise after sending a message

This commit is contained in:
Chris Bianca 2018-02-23 16:14:19 +00:00
parent c5778c3d0d
commit 28b6d2b69c
1 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,9 @@ RCT_EXPORT_METHOD(sendMessage: (NSDictionary *) message
NSDictionary *data = message[@"data"]; NSDictionary *data = message[@"data"];
[[FIRMessaging messaging] sendMessage:data to:to withMessageID:messageId timeToLive:[ttl intValue]]; [[FIRMessaging messaging] sendMessage:data to:to withMessageID:messageId timeToLive:[ttl intValue]];
// TODO: Listen for send success / errors
resolve(nil);
} }
RCT_EXPORT_METHOD(subscribeToTopic: (NSString*) topic) { RCT_EXPORT_METHOD(subscribeToTopic: (NSString*) topic) {