Diff

plugins/mod_presence.lua @ 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
parent 2142:4b339020607f
child 2228:3987078bb179
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