Software /
code /
prosody
Changeset
102:a5b914370db5
Fixed: mod_roster now outputs all roster data (instead of just the JIDs)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 12 Oct 2008 17:41:14 +0500 |
parents | 101:c690fa382743 |
children | 103:ebdb7875443e |
files | plugins/mod_roster.lua |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_roster.lua Sun Oct 12 17:40:03 2008 +0500 +++ b/plugins/mod_roster.lua Sun Oct 12 17:41:14 2008 +0500 @@ -8,7 +8,15 @@ 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;