Merge 0.11->trunk
authorKim Alvefur <zash@zash.se>
Mon, 07 Jan 2019 15:02:11 +0100
changeset 9776 7934e2c6b030
parent 9770 f40b9649e929 (current diff)
parent 9775 bf92f37de137 (diff)
child 9779 b16780e7939f
Merge 0.11->trunk
--- a/plugins/mod_csi_simple.lua	Sun Jan 06 12:20:57 2019 +0100
+++ b/plugins/mod_csi_simple.lua	Mon Jan 07 15:02:11 2019 +0100
@@ -63,8 +63,23 @@
 		if st_type == "headline" then
 			return false;
 		end
-		local body = stanza:get_child_text("body");
-		return body;
+		if stanza:get_child("sent", "urn:xmpp:carbons:2") then
+			return true;
+		end
+		local forwarded = stanza:find("{urn:xmpp:carbons:2}received/{urn:xmpp:forward:0}/{jabber:client}message");
+		if forwarded then
+			stanza = forwarded;
+		end
+		if stanza:get_child("body") then
+			return true;
+		end
+		if stanza:get_child("subject") then
+			return true;
+		end
+		if stanza:get_child("encryption", "urn:xmpp:eme:0") then
+			return true;
+		end
+		return false;
 	end
 	return true;
 end, -1);