summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r--protocols/JabberG/src/jabber_util.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 3b7ab9152f..8d1d1e7c72 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -55,7 +55,7 @@ MCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
///////////////////////////////////////////////////////////////////////////////
// JabberHContactFromJID - looks for the MCONTACT with required JID
-MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
+MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, bool bStripResource)
{
if (jid == NULL)
return NULL;
@@ -71,17 +71,14 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
if (item != NULL)
result = mir_tstrcmpi(jid, dbJid);
else {
- if (bStripResource == 3) {
+ if (bStripResource) {
if (bIsChat)
result = mir_tstrcmpi(jid, dbJid); // for chat room we have to have full contact matched
- else if (TRUE)
- result = _tcsnicmp(jid, dbJid, mir_tstrlen(dbJid));
else
- result = JabberCompareJids(jid, dbJid);
+ result = _tcsnicmp(jid, dbJid, mir_tstrlen(dbJid));
}
// most probably it should just look full matching contact
- else
- result = mir_tstrcmpi(jid, dbJid);
+ else result = mir_tstrcmpi(jid, dbJid);
}
if (result == 0)