Mercurial > prosody-hg
comparison plugins/mod_pubsub/pubsub.lib.lua @ 13953:3eb39ff813ac
mod_pubsub: Fix error reporting for <affiliations> (thanks luacheck)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 25 Sep 2025 17:11:01 +0200 |
| parents | eea166afad9b |
| children | 11573716205f |
comparison
equal
deleted
inserted
replaced
| 13952:39c6cb7900f8 | 13953:3eb39ff813ac |
|---|---|
| 794 end | 794 end |
| 795 | 795 |
| 796 function handlers.get_affiliations(origin, stanza, affiliations, service) | 796 function handlers.get_affiliations(origin, stanza, affiliations, service) |
| 797 local ok, nodes = service:get_nodes(stanza.attr.from); | 797 local ok, nodes = service:get_nodes(stanza.attr.from); |
| 798 if not ok then | 798 if not ok then |
| 799 origin.send(pubsub_error_reply(stanza, err)); | 799 origin.send(pubsub_error_reply(stanza, nodes)); |
| 800 return true; | 800 return true; |
| 801 end | 801 end |
| 802 local node = affiliations.attr.node; | 802 local node = affiliations.attr.node; |
| 803 if node then | 803 if node then |
| 804 nodes = { [node] = nodes[node] }; | 804 nodes = { [node] = nodes[node] }; |
