From 29e128513d3abdaae829e99ec9dfab1b0a0d84cd Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 14 Mar 2014 20:19:58 +0100 Subject: nick name more persistant than ever before --- src/eu/siacs/conversations/persistance/DatabaseBackend.java | 4 ++-- src/eu/siacs/conversations/services/XmppConnectionService.java | 1 - src/eu/siacs/conversations/xmpp/XmppConnection.java | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/eu') diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index 81d4e4fb..434d6779 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -138,9 +138,9 @@ public class DatabaseBackend extends SQLiteOpenHelper { public Conversation findConversation(Account account, String contactJid) { SQLiteDatabase db = this.getReadableDatabase(); - String[] selectionArgs = { account.getUuid(), contactJid }; + String[] selectionArgs = { account.getUuid(), contactJid+"%" }; Cursor cursor = db.query(Conversation.TABLENAME, null, - Conversation.ACCOUNT + "=? AND " + Conversation.CONTACTJID + "=?", + Conversation.ACCOUNT + "=? AND " + Conversation.CONTACTJID + " like ?", selectionArgs, null, null, null); if (cursor.getCount() == 0) return null; diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 6b025d99..438150ac 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -992,7 +992,6 @@ public class XmppConnectionService extends Service { } private OnRenameListener renameListener = null; - private boolean pongReceived; public void setOnRenameListener(OnRenameListener listener) { this.renameListener = listener; diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index 668391ad..4d5d0ec2 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -443,7 +443,6 @@ public class XmppConnection implements Runnable { } else if (this.streamFeatures.hasChild("register")&&(account.isOptionSet(Account.OPTION_REGISTER))) { sendRegistryRequest(); } else if (!this.streamFeatures.hasChild("register")&&(account.isOptionSet(Account.OPTION_REGISTER))) { - //Log.d(LOGTAG,"registration not supported. stream features where"+this.streamFeatures.toString()); changeStatus(Account.STATUS_REGISTRATION_NOT_SUPPORTED); disconnect(true); } else if (this.streamFeatures.hasChild("mechanisms") -- cgit v1.2.3