summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index d3315aff28..84cae898da 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1453,11 +1453,9 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co
mir_sntprintf(szFullJid, SIZEOF(szFullJid), _T("%s/%s"), item->jid, nick);
HANDLE hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
if (hContact != NULL) {
- for (int i=0; i < item->resourceCount; i++) {
- if (_tcsicmp(item->pResources[i].resourceName, nick) == 0) {
- ppro->setWord(hContact, "Status", item->pResources[i].status);
- break;
- } }
+ JABBER_RESOURCE_STATUS *r = item->findResource(nick);
+ if (r)
+ ppro->setWord(hContact, "Status", r->status);
db_set_b(hContact, "CList", "Hidden", 1);
ppro->setTString(hContact, "Nick", nick);