From c70af86e2ee43ea337784b4a5e044d68ca04d30c Mon Sep 17 00:00:00 2001 From: Bilal Syed Date: Wed, 11 Jul 2018 15:30:35 +0300 Subject: [PATCH] [Android] Fix getInitialLink() is NULL --- .../java/io/invertase/firebase/links/RNFirebaseLinks.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/io/invertase/firebase/links/RNFirebaseLinks.java b/android/src/main/java/io/invertase/firebase/links/RNFirebaseLinks.java index 9c308168..099bd3d3 100644 --- a/android/src/main/java/io/invertase/firebase/links/RNFirebaseLinks.java +++ b/android/src/main/java/io/invertase/firebase/links/RNFirebaseLinks.java @@ -174,7 +174,11 @@ public class RNFirebaseLinks extends ReactContextBaseJavaModule implements Activ // Looks at the internals of the link data to detect whether it's an invitation or not private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) { - return FirebaseAppInvite.getInvitation(pendingDynamicLinkData) != null; + FirebaseAppInvite invite = FirebaseAppInvite.getInvitation(pendingDynamicLinkData); + if (invite != null && invite.getInvitationId() != null && !invite.getInvitationId().isEmpty()) { + return true; + } + return false; } private DynamicLink.Builder getDynamicLinkBuilder(final ReadableMap linkData) {