diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
| -rwxr-xr-x | protocols/JabberG/src/jabber_util.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index ec09d029ec..6a079d734e 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -439,8 +439,12 @@ void CJabberProto::SendPresenceTo(int status, const char *to, const TiXmlElement }
}
- if (m_tmJabberIdleStartTime)
- p << XQUERY(JABBER_FEAT_LAST_ACTIVITY) << XATTRI("seconds", time(0) - m_tmJabberIdleStartTime);
+ if (m_tmJabberIdleStartTime) {
+ // XEP-0319 support
+ char szSince[100];
+ time2str(m_tmJabberIdleStartTime, szSince, _countof(szSince));
+ p << XCHILDNS("idle", JABBER_FEAT_IDLE) << XATTR("since", szSince);
+ }
if (m_bEnableAvatars) {
TiXmlElement *x = p << XCHILDNS("x", "vcard-temp:x:update");
|
