changeset 837:0ef11dee7050

mod_carbons: Fix logic, top resources should only be excluded for incoming messages
author Kim Alvefur <zash@zash.se>
date Sat, 22 Sep 2012 02:06:21 +0200
parents a86131581180
children c9e2beec4ef6
files mod_carbons/mod_carbons.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);