Software /
code /
verse
File
plugins/roster.lua @ 110:3fca7dd127df
doc/example_jingle.lua, doc/example_jingle_send.lua: Example scripts to receive and send files using Jingle
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 11:16:46 +0100 |
parent | 82:f306c2f8bb88 |
child | 192:d20feb8034f5 |
line wrap: on
line source
local xmlns_roster = "jabber:iq:roster"; function verse.plugins.roster(stream) function stream:roster_add(jid, callback) self:send_iq(verse.iq({ type = "set" }) :tag("query", { xmlns = xmlns_roster }) :tag("item", { jid = jid }), function () callback(); end); end function stream:roster_fetch(callback) self:send_iq(verse.iq({type="get"}):tag("query", { xmlns = xmlns_roster }), function (result) --TODO: Pass parsed roster to callback callback(result); end); end end