mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.

Sun, 22 Nov 2009 21:47:54 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 22 Nov 2009 21:47:54 +0500
changeset 2143
13ac68e8760b
parent 2142
4b339020607f
child 2144
8e59d37a0e68
child 2149
119323e35c32

mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_presence.lua	Sun Nov 22 21:45:31 2009 +0500
+++ b/plugins/mod_presence.lua	Sun Nov 22 21:47:54 2009 +0500
@@ -242,14 +242,17 @@
 		end
 	elseif stanza.attr.type == "unsubscribe" then
 		if rostermanager.process_inbound_unsubscribe(node, host, from_bare) then
+			sessionmanager.send_to_interested_resources(node, host, stanza);
 			rostermanager.roster_push(node, host, from_bare);
 		end
 	elseif stanza.attr.type == "subscribed" then
 		if rostermanager.process_inbound_subscription_approval(node, host, from_bare) then
+			sessionmanager.send_to_interested_resources(node, host, stanza);
 			rostermanager.roster_push(node, host, from_bare);
 		end
 	elseif stanza.attr.type == "unsubscribed" then
 		if rostermanager.process_inbound_subscription_cancellation(node, host, from_bare) then
+			sessionmanager.send_to_interested_resources(node, host, stanza);
 			rostermanager.roster_push(node, host, from_bare);
 		end
 	end -- discard any other type

mercurial