Fix nil concat for good this time (\!)

Fri, 24 Oct 2008 15:20:34 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 24 Oct 2008 15:20:34 +0100
changeset 160
018c7f5ef0ea
parent 159
d71454f97faf
child 161
8c1a8a3e32e8

Fix nil concat for good this time (\!)

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- 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

mercurial