From 1820b163a10df263844da663c5bb6947c1c17989 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 19 Nov 2016 10:29:08 +0100 Subject: [PATCH] fixed regression that would crash create contact dialog. fixes #2131 --- .../siacs/conversations/ui/StartConversationActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 2d24fbbf6..2b3a44696 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -401,7 +401,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU EnterJidDialog dialog = new EnterJidDialog( this, mKnownHosts, mActivatedAccounts, getString(R.string.create_contact), getString(R.string.create), - prefilledJid, null, !invite.hasFingerprints() + prefilledJid, null, invite == null || !invite.hasFingerprints() ); dialog.setOnEnterJidDialogPositiveListener(new EnterJidDialog.OnEnterJidDialogPositiveListener() { @@ -420,8 +420,10 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU if (contact.showInRoster()) { throw new EnterJidDialog.JidError(getString(R.string.contact_already_exists)); } else { - //contact.addOtrFingerprint(fingerprint); xmppConnectionService.createContact(contact); + if (invite != null && invite.hasFingerprints()) { + xmppConnectionService.verifyFingerprints(contact,invite.getFingerprints()); + } switchToConversation(contact); return true; }