From e1a6ceb49baf3b89352dc407223893d77604e354 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 30 Mar 2018 15:57:44 +0200 Subject: [PATCH] fixed regression in StartConversationActivity that ignored welcome jid --- .../siacs/conversations/ui/StartConversationActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index b79c2d928..01de9a8f0 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -225,7 +225,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } private static boolean isViewIntent(final Intent i) { - return i != null && (Intent.ACTION_VIEW.equals(i.getAction()) || Intent.ACTION_SENDTO.equals(i.getAction())); + return i != null && (Intent.ACTION_VIEW.equals(i.getAction()) || Intent.ACTION_SENDTO.equals(i.getAction()) || i.hasExtra(WelcomeActivity.EXTRA_INVITE_URI)); } protected void hideToast() { @@ -316,8 +316,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU if (this.mTheme != theme) { recreate(); } else { - Intent i = getIntent(); - if (i == null || !i.hasExtra(WelcomeActivity.EXTRA_INVITE_URI)) { + if (pendingViewIntent.peek() == null) { askForContactsPermissions(); } } @@ -729,7 +728,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } } - protected boolean processViewIntent(Intent intent) { + protected boolean processViewIntent(@NonNull Intent intent) { final String inviteUri = intent.getStringExtra(WelcomeActivity.EXTRA_INVITE_URI); if (inviteUri != null) { Invite invite = new Invite(inviteUri);