Software /
code /
prosody
Diff
util/pubsub.lua @ 8312:6fd36e73082b
util.pubsub: Clear data on node deletion
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 09 Oct 2017 01:57:55 +0200 |
parent | 8297:ac5c90230c2c |
child | 8316:8648cb171213 |
line wrap: on
line diff
--- a/util/pubsub.lua Mon Oct 09 01:45:20 2017 +0200 +++ b/util/pubsub.lua Mon Oct 09 01:57:55 2017 +0200 @@ -244,6 +244,9 @@ 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);