From dee8f7fde4d5e23c0139c2a7bc2871929c0df246 Mon Sep 17 00:00:00 2001
From: daurnimator <quae@daurnimator.com>
Date: Tue, 16 Sep 2014 17:11:29 -0400
Subject: plugins/muc/muc.lib: Fix iq results coming from the real jid, not the
 in-room jid (thanks Lance)

---
 plugins/muc/muc.lib.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'plugins/muc')

diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 6bcb28b1..f2dde69e 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -531,7 +531,7 @@ function room_mt:handle_iq_to_occupant(origin, stanza)
 				end
 			end
 			if session_jid == nil then return nil; end
-			stanza.attr.from, stanza.attr.to, stanza.attr.id = from_jid, session_jid, id;
+			stanza.attr.from, stanza.attr.to, stanza.attr.id = from_occupant_jid, session_jid, id;
 		end
 		log("debug", "%s sent private iq stanza to %s (%s)", from, to, stanza.attr.to);
 		self:route_stanza(stanza);
-- 
cgit v1.2.3