diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-18 22:38:07 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-18 22:38:07 +0100 |
commit | 54f1422d3d076b7e96cf2c03c61cf75affaf43e7 (patch) | |
tree | a6870ebc71ed2987cf55625fa895dcbdf66912e7 /src/main/java/de/pixart/messenger/ui | |
parent | d9659fc3667cff043c922c5132f52bd5defc36fe (diff) |
put omemo fingerprint in own uri (qr code / nfc)
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 83ab06b62..cd64149cd 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -841,9 +841,13 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } private boolean handleJid(Invite invite) { - Log.d(Config.LOGTAG,"handling invite for "+invite.getJid()); - for(XmppUri.Fingerprint fp : invite.getFingerprints()) { - Log.d(Config.LOGTAG,fp.toString()); + Account account = xmppConnectionService.findAccountByJid(invite.getJid()); + if (account != null && invite.hasFingerprints()) { + if (xmppConnectionService.verifyFingerprints(account,invite.getFingerprints())) { + switchToAccount(account); + finish(); + return true; + } } List<Contact> contacts = xmppConnectionService.findContacts(invite.getJid()); if (invite.isMuc()) { @@ -863,12 +867,6 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU if (invite.hasFingerprints()) { xmppConnectionService.verifyFingerprints(contact,invite.getFingerprints()); } - /*if (invite.getFingerprint() != null) { - if (contact.addOtrFingerprint(invite.getFingerprint())) { - Log.d(Config.LOGTAG, "added new fingerprint"); - xmppConnectionService.syncRosterToDisk(contact.getAccount()); - } - }*/ switchToConversation(contact); return true; } else { |