Diff

util/pubsub.lua @ 9179:82fad995a149

util.pubsub: Pass "retract" as the type of such broadcasts This moves some XEP-0060 awkwardness out of util.pubsub and into mod_pubsub A retraction is broadcast in an <items> container, whereas most other kinds of broadcasts are in a container with a name matching the 'kind' attribute.
author Kim Alvefur <zash@zash.se>
date Thu, 16 Aug 2018 14:32:21 +0200
parent 9172:822e9c5ff4a4
child 9195:b6ffd4f951b9
line wrap: on
line diff
--- a/util/pubsub.lua	Thu Aug 16 06:05:11 2018 +0200
+++ b/util/pubsub.lua	Thu Aug 16 14:32:21 2018 +0200
@@ -523,7 +523,7 @@
 	end
 	self.events.fire_event("item-retracted", { node = node, actor = actor, id = id });
 	if retract then
-		self.config.broadcaster("items", node, node_obj.subscribers, retract, actor, node_obj, self);
+		self.config.broadcaster("retract", node, node_obj.subscribers, retract, actor, node_obj, self);
 	end
 	return true
 end