diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-09 01:57:55 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-09 01:57:55 +0200 |
commit | d960ca7d6b76d9de4dfc38bd578b5fda92bcddf0 (patch) | |
tree | bae2acc3492210e8689791720c66bdee99e256c9 /util/pubsub.lua | |
parent | 1757bceae2c633aa2d1b1832c95af98291a6809e (diff) | |
download | prosody-d960ca7d6b76d9de4dfc38bd578b5fda92bcddf0.tar.gz prosody-d960ca7d6b76d9de4dfc38bd578b5fda92bcddf0.zip |
util.pubsub: Clear data on node deletion
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index 6dbbad20..cae13521 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -244,6 +244,9 @@ function service:delete(node, actor) return false, "item-not-found"; end self.nodes[node] = nil; + if self.data[node] and self.data[node].clear then + self.data[node]:clear(); + end self.data[node] = nil; self.events.fire_event("node-deleted", { node = node, actor = actor }); self.config.broadcaster("delete", node, node_obj.subscribers); |