diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-10-12 17:41:14 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-10-12 17:41:14 +0500 |
commit | bbff39858de6bb4c7c2714c658856e9d7b32dd6f (patch) | |
tree | 811c37020dc9633f7fa18852e9249eb3062ac490 /plugins | |
parent | 957fe047e2da04dd1fc05aacaa119d4ae1944e39 (diff) | |
download | prosody-bbff39858de6bb4c7c2714c658856e9d7b32dd6f.tar.gz prosody-bbff39858de6bb4c7c2714c658856e9d7b32dd6f.zip |
Fixed: mod_roster now outputs all roster data (instead of just the JIDs)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_roster.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/mod_roster.lua b/plugins/mod_roster.lua index 962c6c70..6d981761 100644 --- a/plugins/mod_roster.lua +++ b/plugins/mod_roster.lua @@ -8,7 +8,15 @@ add_iq_handler("c2s", "jabber:iq:roster", local roster = st.reply(stanza) :query("jabber:iq:roster"); for jid in pairs(session.roster) do - roster:tag("item", { jid = jid, subscription = "none" }):up(); + local item = st.stanza("item", { + jid = jid, + subscription = session.roster[jid].subscription, + name = session.roster[jid].name, + }); + for group in pairs(session.roster[jid].groups) do + item:tag("group"):text(group):up(); + end + roster:add_child(item); end send(session, roster); return true; |