--- a/libpurple/protocols/jabber/pep.c Wed Jun 06 01:23:18 2007 +0000 +++ b/libpurple/protocols/jabber/pep.c Wed Jun 06 01:37:28 2007 +0000 @@ -20,6 +20,7 @@ */ #include "pep.h" +#include "iq.h" void jabber_pep_init(JabberStream *js) { @@ -29,3 +30,16 @@ /* this may be called even when the own server doesn't support pep! */ } + +void jabber_pep_publish(JabberStream *js, xmlnode *publish) { + JabberIq *iq = jabber_iq_new(js, JABBER_IQ_SET); + + xmlnode *pubsub = xmlnode_new("pubsub"); + xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub"); + + xmlnode_insert_child(pubsub, publish); + + xmlnode_insert_child(iq->node, pubsub); + + jabber_iq_send(iq); +}