Removed: Unnecessary check in mod_roster. session.roster is guaranteed to be available for "c2s" session type.

Wed, 08 Oct 2008 20:38:05 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Wed, 08 Oct 2008 20:38:05 +0500
changeset 79
2766e23c4d7d
parent 78
972e31cc91e8
child 80
523ac742cc19

Removed: Unnecessary check in mod_roster. session.roster is guaranteed to be available for "c2s" session type.

plugins/mod_roster.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_roster.lua	Wed Oct 08 20:37:16 2008 +0500
+++ b/plugins/mod_roster.lua	Wed Oct 08 20:38:05 2008 +0500
@@ -5,14 +5,6 @@
 add_iq_handler("c2s", "jabber:iq:roster", 
 		function (session, stanza)
 			if stanza.attr.type == "get" then
-				session.roster = session.roster or rostermanager.getroster(session.username, session.host);
-				if session.roster == false then
-					send(session, st.reply(stanza)
-						:tag("error", { type = "wait" })
-						:tag("internal-server-error", { xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}));
-					return true;
-				else session.roster = session.roster or {};
-				end
 				local roster = st.reply(stanza)
 							:query("jabber:iq:roster");
 				for jid in pairs(session.roster) do

mercurial