diff libpurple/protocols/jabber/pep.c @ 26791:80437c891f92

Publish only 'new' xmlns of avatars and delete old. Instead of publishing our avatar to both PEP nodes, publish only to the new and delete anything at the old. We still support receiving both/either. Backward compatibility is achieved through vcard-temp:x:update.
author Paul Aurich <paul@darkrain42.org>
date Mon, 27 Apr 2009 05:49:32 +0000
parents 242a8c97270b
children c26c6d25142d
line wrap: on
line diff
--- a/libpurple/protocols/jabber/pep.c	Mon Apr 27 02:38:52 2009 +0000
+++ b/libpurple/protocols/jabber/pep.c	Mon Apr 27 05:49:32 2009 +0000
@@ -112,6 +112,25 @@
 	g_free(jid);
 }
 
+void jabber_pep_delete_node(JabberStream *js, const gchar *node)
+{
+	JabberIq *iq;
+	xmlnode *pubsub, *del;
+
+	g_return_if_fail(node != NULL);
+	g_return_if_fail(js->pep);
+
+	iq = jabber_iq_new(js, JABBER_IQ_SET);
+
+	pubsub = xmlnode_new_child(iq->node, "pubsub");
+	xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub#owner");
+
+	del = xmlnode_new_child(pubsub, "delete");
+	xmlnode_set_attrib(del, "node", node);
+
+	jabber_iq_send(iq);
+}
+
 void jabber_pep_publish(JabberStream *js, xmlnode *publish) {
 	JabberIq *iq;
 	xmlnode *pubsub;