# HG changeset patch # User Kim Alvefur # Date 1582830114 -3600 # Node ID 657e61531b33d9d341e963a6c5246c29465fd71d # Parent 5376f882cf82f5d5732c69671fd468e6d1634149 mod_pubsub, mod_pep: Ensure correct number of children of (fixes #1496) diff -r 5376f882cf82 -r 657e61531b33 plugins/mod_pep.lua --- a/plugins/mod_pep.lua Thu Feb 27 19:42:51 2020 +0100 +++ b/plugins/mod_pep.lua Thu Feb 27 20:01:54 2020 +0100 @@ -51,7 +51,7 @@ end function is_item_stanza(item) - return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item"; + return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item" and #item.tags == 1; end function check_node_config(node, actor, new_config) -- luacheck: ignore 212/node 212/actor diff -r 5376f882cf82 -r 657e61531b33 plugins/mod_pubsub/mod_pubsub.lua --- a/plugins/mod_pubsub/mod_pubsub.lua Thu Feb 27 19:42:51 2020 +0100 +++ b/plugins/mod_pubsub/mod_pubsub.lua Thu Feb 27 20:01:54 2020 +0100 @@ -112,7 +112,7 @@ end function is_item_stanza(item) - return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item"; + return st.is_stanza(item) and item.attr.xmlns == xmlns_pubsub and item.name == "item" and #item.tags == 1; end module:hook("pubsub-summary/http://www.w3.org/2005/Atom", function (event)