Mercurial > prosody-hg
view plugins/mod_roster.lua @ 89:081e920dc74e
Fixed: incorrect auth check
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 09 Oct 2008 03:40:16 +0500 |
| parents | 2766e23c4d7d |
| children | a5b914370db5 |
line wrap: on
line source
local st = require "util.stanza" local send = require "core.sessionmanager".send_to_session add_iq_handler("c2s", "jabber:iq:roster", function (session, stanza) if stanza.attr.type == "get" then local roster = st.reply(stanza) :query("jabber:iq:roster"); for jid in pairs(session.roster) do roster:tag("item", { jid = jid, subscription = "none" }):up(); end send(session, roster); return true; end end);
