plugins.pubsub: Implement unsubscribe.

Sun, 01 Jan 2012 22:48:11 +0100

author
Kim Alvefur <zash@zash.se>
date
Sun, 01 Jan 2012 22:48:11 +0100
changeset 272
e1833e9bd25b
parent 271
c9d8628a61cc
child 273
c5b7a4c717a6

plugins.pubsub: Implement unsubscribe.

plugins/pubsub.lua file | annotate | diff | comparison | revisions
--- a/plugins/pubsub.lua	Sun Jan 01 22:17:39 2012 +0100
+++ b/plugins/pubsub.lua	Sun Jan 01 22:48:11 2012 +0100
@@ -202,8 +202,9 @@
 	error("Not implemented yet.");
 end
 
-function pubsub_node:unsubscribe(callback)
-	error("Not implemented yet.");
+function pubsub_node:unsubscribe(jid, callback)
+	self.stream:send_iq(pubsub_iq("set", self.service, nil, "unsubscribe", self.node, jid)
+	, callback);
 end
 
 function pubsub_node:configure_subscription(options, callback)

mercurial