stanza_router: Don't fire preprocessing events if stanza is not from full JID

Mon, 29 Jun 2009 13:15:09 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Mon, 29 Jun 2009 13:15:09 +0500
changeset 1444
19598161ae22
parent 1441
9c6c7aa5dc60
child 1445
810037988642

stanza_router: Don't fire preprocessing events if stanza is not from full JID

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Sun Jun 28 22:29:17 2009 +0500
+++ b/core/stanza_router.lua	Mon Jun 29 13:15:09 2009 +0500
@@ -139,7 +139,7 @@
 	end
 
 	local event_data = {origin=origin, stanza=stanza};
-	if origin.full_jid then -- c2s connection
+	if origin.full_jid == stanza.attr.from then -- c2s connection
 		if hosts[origin.host].events.fire_event('pre-'..stanza.name..to_type, event_data) then return; end -- do preprocessing
 	end
 	local h = hosts[to_bare] or hosts[host or origin.host];

mercurial