diff options
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; |