aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 8b98939b..f3d385c7 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -134,6 +134,7 @@ function core_process_stanza(origin, stanza)
end
if h.events.fire_event(event, {origin = origin, stanza = stanza}) then return; end
end
+ if host and not hosts[host] then host = nil; end -- workaround for a Pidgin bug which sets 'to' to the SRV result
modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza);
end
end
@@ -149,6 +150,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