aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-03 08:00:07 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-03 08:00:07 +0500
commitb17e2aad5ba92853a26a6478a1a90cfc512c7ac1 (patch)
treecf5de7b5fae0721abdc21abbdcf2037bc8ce1db7 /core
parent84bdea076425eb0f109eb38c479ea439bc7ba6f0 (diff)
downloadprosody-b17e2aad5ba92853a26a6478a1a90cfc512c7ac1.tar.gz
prosody-b17e2aad5ba92853a26a6478a1a90cfc512c7ac1.zip
stanza_router: Remove the 'to' attribute when it's value is the bare JID of the local user sending the stanza
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 8b98939b..097d34a8 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -149,6 +149,9 @@ function core_post_stanza(origin, stanza)
to_type = '/full';
else
to_type = '/bare';
+ if node == origin.username and host == origin.host then
+ stanza.attr.to = nil;
+ end
end
else
if host then