From 3761d20e8a4c98f3995aee7731f10773fac43410 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 23 Aug 2006 23:08:45 +0000 Subject: [PATCH] add presence git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2378 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../event_handlers/mod_xmpp_event/mod_xmpp_event.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c b/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c index 511f7b3765..0a0a2d87b4 100644 --- a/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c +++ b/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c @@ -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; }