X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_roster.lua;h=56af53684c304c3f621ffdbe60a542d1e8762721;hb=a438279b6409d9edb636ae948161c6ccf067472b;hp=40d95be7018b8131c96dce6d130c6ee52e81db38;hpb=2f2e1a8532941497e86b7d46fa955ac34a1d1da1;p=prosody.git diff --git a/plugins/mod_roster.lua b/plugins/mod_roster.lua index 40d95be7..56af5368 100644 --- a/plugins/mod_roster.lua +++ b/plugins/mod_roster.lua @@ -1,7 +1,7 @@ -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain --- +-- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- @@ -36,10 +36,10 @@ module:hook("iq/self/jabber:iq:roster:query", function(event) if stanza.attr.type == "get" then local roster = st.reply(stanza); - + local client_ver = tonumber(stanza.tags[1].attr.ver); local server_ver = tonumber(session.roster[false].version or 1); - + if not (client_ver and server_ver) or client_ver ~= server_ver then roster:query("jabber:iq:roster"); -- Client does not support versioning, or has stale roster @@ -69,7 +69,6 @@ module:hook("iq/self/jabber:iq:roster:query", function(event) and query.tags[1].attr.jid ~= "pending" then local item = query.tags[1]; local from_node, from_host = jid_split(stanza.attr.from); - local from_bare = from_node and (from_node.."@"..from_host) or from_host; -- bare JID local jid = jid_prep(item.attr.jid); local node, host, resource = jid_split(jid); if not resource and host then