aboutsummaryrefslogtreecommitdiffstats
path: root/core/rostermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-10-23 20:02:30 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-10-23 20:02:30 +0500
commit869f2859c3538ca67758cbfe10c57eefd6e09899 (patch)
tree97c8d73bafad9246d6e1f1c38eadfe9ad0456a2e /core/rostermanager.lua
parent7bf903298c9349bce933a942d7f8b74b1537da46 (diff)
downloadprosody-869f2859c3538ca67758cbfe10c57eefd6e09899.tar.gz
prosody-869f2859c3538ca67758cbfe10c57eefd6e09899.zip
Roster updates
- Added support for item.ask attribute in rostermanager and mod_roster - Updated roster docs - Removed old code from rostermanager
Diffstat (limited to 'core/rostermanager.lua')
-rw-r--r--core/rostermanager.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 26a14256..c39d28ed 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -18,17 +18,6 @@ local st = require "util.stanza";
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 @@ function roster_push(username, host, jid)
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 @@ function load_roster(username, host)
return roster;
end
-- Attempt to load roster for non-loaded user
+ -- TODO also support loading for offline user
end
function save_roster(username, host)