Changeset

114:bed2a8508cf5

Added session property for interested resources
author Waqas Hussain <waqas20@gmail.com>
date Thu, 23 Oct 2008 02:11:27 +0500
parents 113:9026fdad1531
children 115:db048883a522
files core/rostermanager.lua plugins/mod_roster.lua
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/rostermanager.lua	Thu Oct 23 00:46:38 2008 +0500
+++ b/core/rostermanager.lua	Thu Oct 23 02:11:27 2008 +0500
@@ -76,7 +76,7 @@
 		stanza:up();
 		-- stanza ready
 		for _, session in pairs(hosts[host].sessions[username].sessions) do
-			if session.full_jid then
+			if session.interested then
 				-- FIXME do we need to set stanza.attr.to?
 				session.send(stanza);
 			end
--- a/plugins/mod_roster.lua	Thu Oct 23 00:46:38 2008 +0500
+++ b/plugins/mod_roster.lua	Thu Oct 23 02:11:27 2008 +0500
@@ -26,6 +26,7 @@
 						end
 					end
 					send(session, roster);
+					session.interested = true; -- resource is interested in roster updates
 					return true;
 				elseif stanza.attr.type == "set" then
 					local query = stanza.tags[1];