aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-07 15:02:11 +0100
committerKim Alvefur <zash@zash.se>2019-01-07 15:02:11 +0100
commit2bd818536fe3a02c6a405e93c28a4af97ba4f4a2 (patch)
treed32929de61fb06689fe48e5c018873c5cdb4f73f /plugins
parentf0550233fa24e17773e0c7cc21885cd195ad8c1f (diff)
parent24c44a4566cca3fefd978a6668d20f750a813a8a (diff)
downloadprosody-2bd818536fe3a02c6a405e93c28a4af97ba4f4a2.tar.gz
prosody-2bd818536fe3a02c6a405e93c28a4af97ba4f4a2.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_csi_simple.lua19
1 files changed, 17 insertions, 2 deletions
diff --git a/plugins/mod_csi_simple.lua b/plugins/mod_csi_simple.lua
index 1efff38f..da2dd953 100644
--- a/plugins/mod_csi_simple.lua
+++ b/plugins/mod_csi_simple.lua
@@ -63,8 +63,23 @@ module:hook("csi-is-stanza-important", function (event)
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);