# HG changeset patch # User Matthew Wild # Date 1679045124 0 # Node ID fae5ae0ddb840f689e4db8051c92d9288af5ca79 # Parent 8e6a7a5e70b32511e924066277919d435a067bb9 pubsub: Fire event on item retraction notifications diff -r 8e6a7a5e70b3 -r fae5ae0ddb84 plugins/pubsub.lua --- 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