aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-06-26 19:36:23 +0200
committerKim Alvefur <zash@zash.se>2018-06-26 19:36:23 +0200
commite53d777ec6b3ff92c93714810a3e6bd9ad756ec0 (patch)
treebbc97750f5ecd7b73a3d0952ccf9199adbad5a88
parenta0562991c4e2f94987b1c451099dacc38b1b620d (diff)
downloadprosody-e53d777ec6b3ff92c93714810a3e6bd9ad756ec0.tar.gz
prosody-e53d777ec6b3ff92c93714810a3e6bd9ad756ec0.zip
mod_pubsub: Add the list of affiliations to reply
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index a43161c4..96360677 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -475,6 +475,10 @@ function handlers.owner_get_affiliations(origin, stanza, affiliations, service)
: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