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

This commit is contained in:
Waqas Hussain 2008-10-08 20:38:05 +05:00
parent 2afc5cdef0
commit 99d8d3327b

View file

@ -5,14 +5,6 @@ local send = require "core.sessionmanager".send_to_session
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