Fri, 17 Mar 2023 09:25:24 +0000
pubsub: Fire event on item retraction notifications
plugins/pubsub.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/pubsub.lua Fri Mar 17 09:24:36 2023 +0000 +++ b/plugins/pubsub.lua Fri Mar 17 09:25:24 2023 +0000 @@ -25,6 +25,13 @@ item = item; }); end + for retract in items:childtags("retract") do + stream:event("pubsub/retraction", { + from = m_from; + node = node; + item = retract; + }); + end end end end); @@ -244,8 +251,7 @@ function pubsub_node:items(full, callback) if full then - self.stream:send_iq(pubsub_iq("get", self.service, nil, "items", self.node) - , callback); + return self:item(nil, callback); else self.stream:disco_items(self.service, self.node, callback); end