summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-24 20:14:01 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-24 20:14:01 +0300
commit840545a4faf34c8c09228ea7a0544d16ae4130c9 (patch)
tree5c17a2557f2d5f37492845cfacb29530a3dcde6e
parent76cb1ae4c9624901458aaeb3243725d74fa9233f (diff)
if the idle time is set, include it into a presence (XEP-0256 support)
-rw-r--r--protocols/JabberG/src/jabber_util.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 11185bd6b4..c1fb18a4e2 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -435,6 +435,9 @@ void CJabberProto::SendPresenceTo(int status, const wchar_t* to, HXML extra, con
}
}
+ if (m_tmJabberIdleStartTime)
+ p << XQUERY(JABBER_FEAT_LAST_ACTIVITY) << XATTRI(L"seconds", time(0) - m_tmJabberIdleStartTime);
+
if (m_options.EnableAvatars) {
HXML x = p << XCHILDNS(L"x", L"vcard-temp:x:update");