summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_list.cpp')
-rw-r--r--protocols/JabberG/src/jabber_list.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp
index 8582963ebe..08e7eb0cff 100644
--- a/protocols/JabberG/src/jabber_list.cpp
+++ b/protocols/JabberG/src/jabber_list.cpp
@@ -394,19 +394,23 @@ char* CJabberProto::ListGetBestClientResourceNamePtr(const char *jid)
for (auto &it : LI->arResources) {
bool foundBetter = false;
switch (it->m_iStatus) {
- case ID_STATUS_ONLINE:
+ case ID_STATUS_FREECHAT:
foundBetter = true;
break;
+ case ID_STATUS_ONLINE:
+ if (status != ID_STATUS_FREECHAT)
+ foundBetter = true;
+ break;
case ID_STATUS_DND:
- if (status != ID_STATUS_ONLINE)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE)
foundBetter = true;
break;
case ID_STATUS_AWAY:
- if (status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND)
foundBetter = true;
break;
case ID_STATUS_NA:
- if (status != ID_STATUS_ONLINE && status != ID_STATUS_DND && status != ID_STATUS_AWAY)
+ if (status != ID_STATUS_FREECHAT && status != ID_STATUS_ONLINE && status != ID_STATUS_DND && status != ID_STATUS_AWAY)
foundBetter = true;
break;
}