mod_presence: Use the local host as origin for subscription request acks.
authorWaqas Hussain <waqas20@gmail.com>
Thu, 26 Nov 2009 13:02:10 +0500
changeset 2229 3b38ec879076
parent 2228 3987078bb179
child 2230 aa830ab55bbc
child 2259 22417227d2ce
mod_presence: Use the local host as origin for subscription request acks.
plugins/mod_presence.lua
--- 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);