fixed regression of xmpp uris not working

This commit is contained in:
iNPUTmice 2014-11-16 22:23:42 +01:00
parent 155b607f4d
commit 8c4236b01b
2 changed files with 11 additions and 14 deletions

View file

@ -547,7 +547,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
Invite invite = new Invite(data); Invite invite = new Invite(data);
if (xmppConnectionServiceBound) { if (xmppConnectionServiceBound) {
invite.invite(); invite.invite();
} else if (invite.jid != null) { } else if (invite.getJid() != null) {
this.mPendingInvite = invite; this.mPendingInvite = invite;
} else { } else {
this.mPendingInvite = null; this.mPendingInvite = null;
@ -622,14 +622,14 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
private boolean handleJid(Invite invite) { private boolean handleJid(Invite invite) {
List<Contact> contacts = xmppConnectionService.findContacts(invite.jid); List<Contact> contacts = xmppConnectionService.findContacts(invite.getJid().toString());
if (contacts.size() == 0) { if (contacts.size() == 0) {
showCreateContactDialog(invite.jid,invite.fingerprint); showCreateContactDialog(invite.getJid().toString(),invite.getFingerprint());
return false; return false;
} else if (contacts.size() == 1) { } else if (contacts.size() == 1) {
Contact contact = contacts.get(0); Contact contact = contacts.get(0);
if (invite.fingerprint != null) { if (invite.getFingerprint() != null) {
if (contact.addOtrFingerprint(invite.fingerprint)) { if (contact.addOtrFingerprint(invite.getFingerprint())) {
Log.d(Config.LOGTAG,"added new fingerprint"); Log.d(Config.LOGTAG,"added new fingerprint");
xmppConnectionService.syncRosterToDisk(contact.getAccount()); xmppConnectionService.syncRosterToDisk(contact.getAccount());
} }
@ -640,10 +640,10 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
if (mMenuSearchView != null) { if (mMenuSearchView != null) {
mMenuSearchView.expandActionView(); mMenuSearchView.expandActionView();
mSearchEditText.setText(""); mSearchEditText.setText("");
mSearchEditText.append(invite.jid); mSearchEditText.append(invite.getJid().toString());
filter(invite.jid); filter(invite.getJid().toString());
} else { } else {
mInitialJid = invite.jid; mInitialJid = invite.getJid().toString();
} }
return true; return true;
} }
@ -754,9 +754,6 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
private class Invite extends XmppUri { private class Invite extends XmppUri {
private String jid;
private boolean muc;
private String fingerprint;
public Invite(Uri uri) { public Invite(Uri uri) {
super(uri); super(uri);

View file

@ -11,9 +11,9 @@ import eu.siacs.conversations.xmpp.jid.Jid;
public class XmppUri { public class XmppUri {
private String jid; protected String jid;
private boolean muc; protected boolean muc;
private String fingerprint; protected String fingerprint;
public XmppUri(String uri) { public XmppUri(String uri) {
try { try {