mod_presence: Use the local host as origin for subscription request acks.
authorWaqas Hussain <waqas20@gmail.com>
Thu, 26 Nov 2009 08:02:10 +0000 (13:02 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Thu, 26 Nov 2009 08:02:10 +0000 (13:02 +0500)
plugins/mod_presence.lua

index 939df6b8473d3a461b77535cbf1111e1e3436ec6..d3818a5da27b031d0bb81f11d8e50a2bf6389da9 100644 (file)
@@ -230,7 +230,7 @@ function handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_b
                                -- 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);