From 2a623f411c571d5cac76c5f91bd0e52eaaf687d9 Mon Sep 17 00:00:00 2001
From: Waqas Hussain <waqas20@gmail.com>
Date: Mon, 1 Jun 2009 17:53:39 +0500
Subject: stanza_router: Reply with an error on groupchat messages to bare JID

---
 core/stanza_router.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 03221fb9..8b98939b 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -244,7 +244,7 @@ function core_route_stanza(origin, stanza)
 								session.send(stanza);
 							end
 						end
-					elseif resource and stanza.attr.type == 'groupchat' then
+					elseif stanza.attr.type == 'groupchat' then
 						-- Groupchat message sent to offline resource
 						origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 					else
-- 
cgit v1.2.3