mod_presence: Acknowledge subscription requests by responding with an unavailable presence.

Sun, 22 Nov 2009 21:45:31 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 22 Nov 2009 21:45:31 +0500
changeset 2142
4b339020607f
parent 2141
f544729f9228
child 2143
13ac68e8760b

mod_presence: Acknowledge subscription requests by responding with an unavailable presence.

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_presence.lua	Sun Nov 22 21:41:09 2009 +0500
+++ b/plugins/mod_presence.lua	Sun Nov 22 21:45:31 2009 +0500
@@ -233,6 +233,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
 			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);

mercurial