]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add presence
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 23 Aug 2006 23:08:45 +0000 (23:08 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 23 Aug 2006 23:08:45 +0000 (23:08 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2378 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c

index 511f7b3765cfb91ed53080125b02124f33be1672..0a0a2d87b40da062a0e2a842129081ad7890fd19 100644 (file)
@@ -148,6 +148,17 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
 
 static int on_result(struct session *sess, ikspak * pak)
 {
+       iks *msg, *ctag;
+
+       msg = iks_make_pres (IKS_SHOW_AVAILABLE, "Available"); 
+       ctag = iks_insert(msg, "c");
+       iks_insert_attrib(ctag, "node", "http://www.freeswitch.org/xmpp/client/caps");
+       iks_insert_attrib(ctag, "ver", "1.0.0.1");
+       iks_insert_attrib(ctag, "client", "libdingaling");
+       iks_insert_attrib(ctag, "xmlns", "http://jabber.org/protocol/caps");
+
+       iks_send(sess->parser, msg);
+    iks_delete(msg);
 
        return IKS_FILTER_EAT;
 }