From 7ed27bd649a4e4492638ea17406b89596c9e0201 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 26 May 2009 01:07:21 +0100 Subject: mod_roster: Don't send a query element in roster response if roster is unchanged --- plugins/mod_roster.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/mod_roster.lua') diff --git a/plugins/mod_roster.lua b/plugins/mod_roster.lua index 554ef2e5..13ba8c99 100644 --- a/plugins/mod_roster.lua +++ b/plugins/mod_roster.lua @@ -35,12 +35,12 @@ module:add_iq_handler("c2s", "jabber:iq:roster", function (session, stanza) if stanza.tags[1].name == "query" then if stanza.attr.type == "get" then - local roster = st.reply(stanza) - :query("jabber:iq:roster"); + local roster = st.reply(stanza); local ver = stanza.tags[1].attr.ver if (not ver) or tonumber(ver) ~= (session.roster[false].version or 1) then + roster:query("jabber:iq:roster"); -- Client does not support versioning, or has stale roster for jid in pairs(session.roster) do if jid ~= "pending" and jid then -- cgit v1.2.3