diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-26 01:07:21 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-26 01:07:21 +0100 |
commit | 7ed27bd649a4e4492638ea17406b89596c9e0201 (patch) | |
tree | 19264f7794bb72b247df0be7a4cec2356036cc72 /plugins | |
parent | 45fab22634bd749dc35291622fb96d3940530258 (diff) | |
download | prosody-7ed27bd649a4e4492638ea17406b89596c9e0201.tar.gz prosody-7ed27bd649a4e4492638ea17406b89596c9e0201.zip |
mod_roster: Don't send a query element in roster response if roster is unchanged
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_roster.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 |