mod_presence: Use the local host as origin for subscription request acks.
--- a/plugins/mod_presence.lua Thu Nov 26 13:00:11 2009 +0500
+++ b/plugins/mod_presence.lua Thu Nov 26 13:02:10 2009 +0500
@@ -230,7 +230,7 @@
-- TODO send last recieved unavailable presence (or we MAY do nothing, which is fine too)
end
else
- core_route_stanza(origin, st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt
+ core_route_stanza(hosts[host], st.presence({from=to_bare, to=from_bare, type="unavailable"})); -- acknowledging receipt
if not rostermanager.is_contact_pending_in(node, host, from_bare) then
if rostermanager.set_contact_pending_in(node, host, from_bare) then
sessionmanager.send_to_available_resources(node, host, stanza);