mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
Fixed: mod_roster now outputs all roster data (instead of just the JIDs)
This commit is contained in:
parent
957fe047e2
commit
bbff39858d
1 changed files with 9 additions and 1 deletions
|
@ -8,7 +8,15 @@ add_iq_handler("c2s", "jabber:iq:roster",
|
||||||
local roster = st.reply(stanza)
|
local roster = st.reply(stanza)
|
||||||
:query("jabber:iq:roster");
|
:query("jabber:iq:roster");
|
||||||
for jid in pairs(session.roster) do
|
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
|
end
|
||||||
send(session, roster);
|
send(session, roster);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue