Changeset

2143:13ac68e8760b

mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 22 Nov 2009 21:47:54 +0500
parents 2142:4b339020607f
children 2144:8e59d37a0e68 2147:119323e35c32
files plugins/mod_presence.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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