Software /
code /
prosody
Comparison
plugins/mod_storage_xep0227.lua @ 12460:f7e40f1a5f53 0.12
mod_storage_xep0227: Fix mapping of nodes without explicit configuration
Turns out this table was wrong, it's missing some fields which are
required and it's 'name', not 'node'. Setting it to the boolean true
invokes compatibility behavior in mod_pep which results in the correct
default structure.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Apr 2022 23:35:31 +0200 |
parent | 12458:10cc52e4b310 |
child | 12589:39ae08180c81 |
comparison
equal
deleted
inserted
replaced
12458:10cc52e4b310 | 12460:f7e40f1a5f53 |
---|---|
304 local pubsub_el = user_el:get_child("pubsub", xmlns_pubsub); | 304 local pubsub_el = user_el:get_child("pubsub", xmlns_pubsub); |
305 if not pubsub_el then | 305 if not pubsub_el then |
306 return nil; | 306 return nil; |
307 end | 307 end |
308 for node_el in pubsub_el:childtags("items") do | 308 for node_el in pubsub_el:childtags("items") do |
309 nodes[node_el.attr.node] = { | 309 nodes[node_el.attr.node] = true; -- relies on COMPAT behavior in mod_pep |
310 node = node_el.attr.node; | |
311 } | |
312 end | 310 end |
313 return nodes; | 311 return nodes; |
314 end | 312 end |
315 for node_el in owner_el:childtags() do | 313 for node_el in owner_el:childtags() do |
316 local node_name = node_el.attr.node; | 314 local node_name = node_el.attr.node; |