# HG changeset patch # User Kim Alvefur # Date 1368181197 -7200 # Node ID 957704bbe9a1489a2af41b9465d67dd73f400c72 # Parent 8dce8240a77c1823e0a4baf8d5ab1dca8dfbc6ff plugins.pubsub: If no jid given to unsubscribe with, default to what was subscribed to (if given) or the bound jid diff -r 8dce8240a77c -r 957704bbe9a1 plugins/pubsub.lua --- a/plugins/pubsub.lua Fri May 10 12:13:36 2013 +0200 +++ b/plugins/pubsub.lua Fri May 10 12:19:57 2013 +0200 @@ -215,6 +215,7 @@ end function pubsub_node:unsubscribe(jid, callback) + jid = jid or self.subscribed_jid or self.stream.jid; self.stream:send_iq(pubsub_iq("set", self.service, nil, "unsubscribe", self.node, jid) , callback); end