about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-17 16:43:26 +0000
committerJames Booth <boothj5@gmail.com>2013-02-17 16:43:26 +0000
commit1a913b7d9bef2ce4c0449e0c93f82e6331792558 (patch)
treed0002049dfc5cd2734575711cc18663ceb47091d
parente955df889445b7d30b02aaaf7f0bd92b7044f67a (diff)
downloadprofani-tty-1a913b7d9bef2ce4c0449e0c93f82e6331792558.tar.gz
Added ping to features
-rw-r--r--src/xmpp/capabilities.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c
index 52993352..f127b75c 100644
--- a/src/xmpp/capabilities.c
+++ b/src/xmpp/capabilities.c
@@ -262,12 +262,17 @@ caps_create_query_response_stanza(xmpp_ctx_t * const ctx)
     xmpp_stanza_set_name(feature_chatstates, STANZA_NAME_FEATURE);
     xmpp_stanza_set_attribute(feature_chatstates, STANZA_ATTR_VAR, STANZA_NS_CHATSTATES);
 
+    xmpp_stanza_t *feature_ping = xmpp_stanza_new(ctx);
+    xmpp_stanza_set_name(feature_ping, STANZA_NAME_FEATURE);
+    xmpp_stanza_set_attribute(feature_ping, STANZA_ATTR_VAR, STANZA_NS_PING);
+
     xmpp_stanza_add_child(query, identity);
     xmpp_stanza_add_child(query, feature_muc);
     xmpp_stanza_add_child(query, feature_discoinfo);
     xmpp_stanza_add_child(query, feature_caps);
     xmpp_stanza_add_child(query, feature_version);
     xmpp_stanza_add_child(query, feature_chatstates);
+    xmpp_stanza_add_child(query, feature_ping);
 
     xmpp_stanza_release(identity);
     xmpp_stanza_release(feature_muc);