Hi all,

attached a patch for mod_carbons to ignore otr encrypted messages.

Otr encrypted messages can't be readable for other clients, because of
the Diffie-Hellman key exchange so it is useless to send the messages to
other clients.

Feel free to merge!


You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prosody-dev+unsubscr...@googlegroups.com.
To post to this group, send email to prosody-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.
diff -r cc9831033f5d mod_carbons/mod_carbons.lua
--- a/mod_carbons/mod_carbons.lua	Thu Feb 20 20:37:26 2014 +0100
+++ b/mod_carbons/mod_carbons.lua	Mon May 12 01:15:16 2014 +0200
@@ -73,6 +73,9 @@
 	elseif stanza:get_child("no-copy", "urn:xmpp:hints") then
 		module:log("debug", "Message has no-copy hint, ignoring");
+	-- Ignore OTR Messages
+	elseif stanza:get_child_text("body") and stanza:get_child_text("body"):sub(1,4) == "?OTR" then
+        	return 
 	-- Create the carbon copy and wrap it as per the Stanza Forwarding XEP

Reply via email to