mod_carbons: Fix logic, top resources should only be excluded for incoming messages
authorKim Alvefur <zash@zash.se>
Sat, 22 Sep 2012 02:06:21 +0200
changeset 837 0ef11dee7050
parent 836 a86131581180
child 838 c9e2beec4ef6
mod_carbons: Fix logic, top resources should only be excluded for incoming messages
mod_carbons/mod_carbons.lua
--- a/mod_carbons/mod_carbons.lua	Sat Sep 22 01:56:59 2012 +0200
+++ b/mod_carbons/mod_carbons.lua	Sat Sep 22 02:06:21 2012 +0200
@@ -82,7 +82,7 @@
 		-- but not the resource that sent the message, or the one that it's directed to
 		and session ~= target_session
 		-- and isn't among the top resources that would receive the message per standard routing rules
-		and (not c2s or session.priority ~= top_priority) then
+		and (c2s or session.priority ~= top_priority) then
 			carbon.attr.to = session.full_jid;
 			module:log("debug", "Sending carbon to %s", session.full_jid);
 			session.send(carbon);