stanza_router: Skip prepping 'from' on c2s origins - #optimization

Sat, 20 Jun 2009 18:08:57 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sat, 20 Jun 2009 18:08:57 +0500
changeset 1369
633e032a3b4b
parent 1368
0cb70958b8fb
child 1370
3a467e6885f0

stanza_router: Skip prepping 'from' on c2s origins - #optimization

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Sat Jun 20 17:53:39 2009 +0500
+++ b/core/stanza_router.lua	Sat Jun 20 18:08:57 2009 +0500
@@ -78,7 +78,7 @@
 		if resource then to = to_bare.."/"..resource; else to = to_bare; end
 		stanza.attr.to = to;
 	end
-	if from then
+	if from and not origin.full_jid then
 		-- We only stamp the 'from' on c2s stanzas, so we still need to check validity
 		from_node, from_host, from_resource = jid_prepped_split(from);
 		if not from_host then

mercurial