Software /
code /
prosody
Diff
core/rostermanager.lua @ 132:9a4aa57af367
Roster updates
- Added support for item.ask attribute in rostermanager and mod_roster
- Updated roster docs
- Removed old code from rostermanager
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 23 Oct 2008 20:02:30 +0500 |
parent | 114:bed2a8508cf5 |
child | 171:28f420d057a0 |
line wrap: on
line diff
--- a/core/rostermanager.lua Thu Oct 23 19:53:02 2008 +0500 +++ b/core/rostermanager.lua Thu Oct 23 20:02:30 2008 +0500 @@ -18,17 +18,6 @@ module "rostermanager" ---[[function getroster(username, host) - return { - ["mattj@localhost"] = true, - ["tobias@getjabber.ath.cx"] = true, - ["waqas@getjabber.ath.cx"] = true, - ["thorns@getjabber.ath.cx"] = true, - ["idw@getjabber.ath.cx"] = true, - } - --return datamanager.load(username, host, "roster") or {}; -end]] - function add_to_roster(session, jid, item) if session.roster then local old_item = session.roster[jid]; @@ -65,7 +54,7 @@ local stanza = st.iq({type="set"}); stanza:tag("query", {xmlns = "jabber:iq:roster"}); if item then - stanza:tag("item", {jid = jid, subscription = item.subscription, name = item.name}); + stanza:tag("item", {jid = jid, subscription = item.subscription, name = item.name, ask = item.ask}); for group in pairs(item.groups) do stanza:tag("group"):text(group):up(); end @@ -94,6 +83,7 @@ return roster; end -- Attempt to load roster for non-loaded user + -- TODO also support loading for offline user end function save_roster(username, host)