summaryrefslogtreecommitdiff
path: root/protocols/Tlen
diff options
context:
space:
mode:
authorslotwin <slotwin@users.noreply.github.com>2014-12-01 21:34:43 +0000
committerslotwin <slotwin@users.noreply.github.com>2014-12-01 21:34:43 +0000
commit69a417b2f3187aa3d2583037f78cae4d08b8282c (patch)
treef6278d3a5fb5fe310c5d9a690608495291e3105e /protocols/Tlen
parent32784bce1fa5e4270e2ad6293398f170a41400bd (diff)
Tlen: fixed handling of status message for offline contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@11202 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
-rw-r--r--protocols/Tlen/src/tlen_presence.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp
index e36f859f65..60a77916a2 100644
--- a/protocols/Tlen/src/tlen_presence.cpp
+++ b/protocols/Tlen/src/tlen_presence.cpp
@@ -121,17 +121,19 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto)
status = ID_STATUS_INVISIBLE;
}
p = TlenTextDecode(statusNode->text);
- TlenListAddResource(proto, LIST_ROSTER, from, status, p);
- if ((hContact=TlenHContactFromJID(proto, from)) != NULL) {
- if (p != NULL && *p) {
- char* statusMsg_utf8 = mir_utf8encode(p);
- db_set_utf(hContact, "CList", "StatusMsg", statusMsg_utf8);
- mir_free(statusMsg_utf8);
- } else {
- db_unset(hContact, "CList", "StatusMsg");
- }
+ }
+ else
+ p = NULL;
+ TlenListAddResource(proto, LIST_ROSTER, from, status, p);
+ if ((hContact=TlenHContactFromJID(proto, from)) != NULL) {
+ if (p != NULL && *p) {
+ char* statusMsg_utf8 = mir_utf8encode(p);
+ db_set_utf(hContact, "CList", "StatusMsg", statusMsg_utf8);
+ mir_free(statusMsg_utf8);
+ mir_free(p);
+ } else {
+ db_unset(hContact, "CList", "StatusMsg");
}
- if (p) mir_free(p);
}
if ((item=TlenListGetItemPtr(proto, LIST_ROSTER, from)) != NULL) {
// Determine status to show for the contact based on the remaining resources