Changeset

8935:a825ef6de45a

mod_pubsub: Add the list of affiliations to reply
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jun 2018 19:36:23 +0200
parents 8934:365bcf899093
children 8936:7b75c7ec926e
files plugins/mod_pubsub/pubsub.lib.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub/pubsub.lib.lua	Tue Jun 26 19:34:35 2018 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Tue Jun 26 19:36:23 2018 +0200
@@ -475,6 +475,10 @@
 		:tag("pubsub", { xmlns = xmlns_pubsub_owner })
 			:tag("affiliations", { node = node });
 
+	for jid, affiliation in pairs(node_obj.affiliations) do
+		reply:tag("affiliation", { jid = jid, affiliation = affiliation }):up();
+	end
+
 	origin.send(reply);
 	return true;
 end