aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-11-19 10:29:08 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-11-19 10:29:08 +0100
commit1820b163a10df263844da663c5bb6947c1c17989 (patch)
tree3f62527f3e2a9f1abedefbfec02b0cd842df8e8b /src
parent2b9b3be3f1acef278b588c18fd8310920416935b (diff)
fixed regression that would crash create contact dialog. fixes #2131
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java6
1 files 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 2d24fbbf..2b3a4469 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;
}