# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1224858034 -3600
# Node ID 018c7f5ef0eac9601a4fcac781e49a4bab9f68da
# Parent  d71454f97fafc479607e247e85ce20e266ead87e
Fix nil concat for good this time (\!)

diff -r d71454f97faf -r 018c7f5ef0ea core/stanza_router.lua
--- a/core/stanza_router.lua	Fri Oct 24 15:18:53 2008 +0100
+++ b/core/stanza_router.lua	Fri Oct 24 15:20:34 2008 +0100
@@ -198,7 +198,7 @@
 									end
 								end
 							else
-								send(origin, st.presence({from=user.."@"..host, to=stanza.attr.from, type="unsubscribed"}));
+								send(origin, st.presence({from=user.."@"..host, to=origin.username.."@"..origin.host, type="unsubscribed"}));
 							end
 						elseif stanza.attr.type == "subscribe" then
 							-- TODO
@@ -252,7 +252,7 @@
 				-- TODO we would get here for nodeless JIDs too. Do something fun maybe? Echo service? Let plugins use xmpp:server/resource addresses?
 				if stanza.name == "presence" then
 					if stanza.attr.type == "probe" then
-						send(origin, st.presence({from = node.."@"..host, to = origin.username.."@"..origin.host, type = "unsubscribed"}));
+						send(origin, st.presence({from = stanza.attr.to, to = stanza.attr.from, type = "unsubscribed"}));
 					end
 					-- else ignore
 				else