From 840545a4faf34c8c09228ea7a0544d16ae4130c9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Jan 2017 20:14:01 +0300 Subject: if the idle time is set, include it into a presence (XEP-0256 support) --- protocols/JabberG/src/jabber_util.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols') 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"); -- cgit v1.2.3