Comparison

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
comparison
equal deleted inserted replaced
9043:9d77b6588bdf 9044:18cd5102253c
68 end 68 end
69 end 69 end
70 70
71 for jid, options in pairs(jids) do 71 for jid, options in pairs(jids) do
72 local new_stanza = st.clone(message); 72 local new_stanza = st.clone(message);
73 if type(options) == "table" and options["pubsub#include_body"] then 73 if summary and type(options) == "table" and options["pubsub#include_body"] then
74 new_stanza:body(summary); 74 new_stanza:body(summary);
75 end 75 end
76 new_stanza.attr.to = jid; 76 new_stanza.attr.to = jid;
77 module:send(new_stanza); 77 module:send(new_stanza);
78 end 78 end