plugins/mod_pep.lua
changeset 9193 b88f537163da
parent 9192 8fadd3d6c8d3
child 9199 2fc56434c6e3
equal deleted inserted replaced
9192:8fadd3d6c8d3 9193:b88f537163da
   136 			:tag("event", { xmlns = xmlns_pubsub_event })
   136 			:tag("event", { xmlns = xmlns_pubsub_event })
   137 				:tag(kind, { node = node });
   137 				:tag(kind, { node = node });
   138 		if item then
   138 		if item then
   139 			item = st.clone(item);
   139 			item = st.clone(item);
   140 			item.attr.xmlns = nil; -- Clear the pubsub namespace
   140 			item.attr.xmlns = nil; -- Clear the pubsub namespace
       
   141 			if kind == "items" then
       
   142 				if node_obj and node_obj.config.include_payload == false then
       
   143 					item:maptags(function () return nil; end);
       
   144 				end
       
   145 			end
   141 			message:add_child(item);
   146 			message:add_child(item);
   142 		end
   147 		end
   143 		for jid in pairs(jids) do
   148 		for jid in pairs(jids) do
   144 			module:log("debug", "Sending notification to %s from %s: %s", jid, user_bare, tostring(item));
   149 			module:log("debug", "Sending notification to %s from %s: %s", jid, user_bare, tostring(item));
   145 			message.attr.to = jid;
   150 			message.attr.to = jid;