Diff

plugins/mod_pubsub/mod_pubsub.lua @ 9044:18cd5102253c

mod_pubsub: Skip checks for adding body if no body generated
author Kim Alvefur <zash@zash.se>
date Sat, 14 Jul 2018 21:26:59 +0200
parent 9043:9d77b6588bdf
child 9045:4336a2b97aba
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua	Sat Jul 14 21:26:13 2018 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua	Sat Jul 14 21:26:59 2018 +0200
@@ -70,7 +70,7 @@
 
 	for jid, options in pairs(jids) do
 		local new_stanza = st.clone(message);
-		if type(options) == "table" and options["pubsub#include_body"] then
+		if summary and type(options) == "table" and options["pubsub#include_body"] then
 			new_stanza:body(summary);
 		end
 		new_stanza.attr.to = jid;