Added session property for interested resources

Thu, 23 Oct 2008 02:11:27 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 23 Oct 2008 02:11:27 +0500
changeset 114
bed2a8508cf5
parent 113
9026fdad1531
child 115
db048883a522

Added session property for interested resources

core/rostermanager.lua file | annotate | diff | comparison | revisions
plugins/mod_roster.lua file | annotate | diff | comparison | revisions
--- 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];

mercurial