Software /
code /
verse
Comparison
plugins/pubsub.lua @ 338:957704bbe9a1
plugins.pubsub: If no jid given to unsubscribe with, default to what was subscribed to (if given) or the bound jid
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 May 2013 12:19:57 +0200 |
parent | 337:8dce8240a77c |
child | 346:f7854dd16ed3 |
comparison
equal
deleted
inserted
replaced
337:8dce8240a77c | 338:957704bbe9a1 |
---|---|
213 function pubsub_node:affiliation(callback) | 213 function pubsub_node:affiliation(callback) |
214 error("Not implemented yet."); | 214 error("Not implemented yet."); |
215 end | 215 end |
216 | 216 |
217 function pubsub_node:unsubscribe(jid, callback) | 217 function pubsub_node:unsubscribe(jid, callback) |
218 jid = jid or self.subscribed_jid or self.stream.jid; | |
218 self.stream:send_iq(pubsub_iq("set", self.service, nil, "unsubscribe", self.node, jid) | 219 self.stream:send_iq(pubsub_iq("set", self.service, nil, "unsubscribe", self.node, jid) |
219 , callback); | 220 , callback); |
220 end | 221 end |
221 | 222 |
222 function pubsub_node:configure_subscription(options, callback) | 223 function pubsub_node:configure_subscription(options, callback) |