src/protocols/jabber/presence.c

changeset 13385
6fb64ae23761
parent 13214
58fd32eb525f
child 13443
e27e92c22036
--- a/src/protocols/jabber/presence.c	Fri Mar 03 03:00:33 2006 +0000
+++ b/src/protocols/jabber/presence.c	Fri Mar 03 03:38:36 2006 +0000
@@ -136,13 +136,11 @@
 
 xmlnode *jabber_presence_create(JabberBuddyState state, const char *msg, int priority)
 {
-	xmlnode *show, *status, *presence, *pri;
+	xmlnode *show, *status, *presence, *pri, *c;
 	const char *show_string = NULL;
 
-
 	presence = xmlnode_new("presence");
 
-
 	if(state == JABBER_BUDDY_STATE_UNAVAILABLE)
 		xmlnode_set_attrib(presence, "type", "unavailable");
 	else if(state != JABBER_BUDDY_STATE_ONLINE &&
@@ -167,6 +165,12 @@
 		g_free(pstr);
 	}
 
+	/* JEP-0115 */
+	c = xmlnode_new_child(presence, "c");
+	xmlnode_set_attrib(c, "xmlns",  "http://jabber.org/protocol/caps");
+	xmlnode_set_attrib(c, "node", CAPS0115_NODE);
+	xmlnode_set_attrib(c, "ver", VERSION);
+
 	return presence;
 }
 

mercurial