diff plugins/mod_pubsub/mod_pubsub.lua @ 10672:657e61531b33 0.11

mod_pubsub, mod_pep: Ensure correct number of children of <item/> (fixes #1496)
author Kim Alvefur <zash@zash.se>
date Thu, 27 Feb 2020 20:01:54 +0100
parents 8e68136cde08
children 1a23a58ac84e 6c7c50a4de32
line wrap: on
line diff
--- 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)