diff options
author | Marco Cirillo <maranda@lightwitch.org> | 2012-05-09 02:56:22 +0000 |
---|---|---|
committer | Marco Cirillo <maranda@lightwitch.org> | 2012-05-09 02:56:22 +0000 |
commit | dda71bf6d36d1395833a369eebf52fb011cc075f (patch) | |
tree | 323810b0c5baaadf0bc4a68da22b863247ce135f /plugins/mod_dialback.lua | |
parent | 6182580f6518a15abc5bfde7a973a5e5f37afebc (diff) | |
download | prosody-dda71bf6d36d1395833a369eebf52fb011cc075f.tar.gz prosody-dda71bf6d36d1395833a369eebf52fb011cc075f.zip |
mod_dialback: COMPAT reset session.send function for servers (e.g. ejabberd) which don't include a from attr when opening the stream.
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r-- | plugins/mod_dialback.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index 35186c5e..cc076db5 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -78,6 +78,9 @@ module:hook("stanza/jabber:server:dialback:result", function(event) if not origin.from_host then -- Just used for friendlier logging origin.from_host = attr.from; + -- COMPAT: Fix ejabberd chopness by resetting the send function + origin.log("debug", "Remote server didn't specify a from attr, resetting session.send now that we know where to knock to."); + origin.send = function(stanza) hosts[attr.to].events.fire_event("route/remote", { from_host = origin.to_host, to_host = origin.from_host, stanza = stanza}); end end if not origin.to_host then -- Just used for friendlier logging |