Comparison

plugins/mod_admin_adhoc.lua @ 6627:c6e025411baa

mod_admin_adhoc: Remove special treatment of the "pending" roster entry
author Kim Alvefur <zash@zash.se>
date Sat, 25 Apr 2015 14:21:40 +0200
parent 6464:737c81bd898e
child 6779:6236668da30a
comparison
equal deleted inserted replaced
6624:7f9b49f2758a 6627:c6e025411baa
244 end 244 end
245 local roster = rm_load_roster(user, host); 245 local roster = rm_load_roster(user, host);
246 246
247 local query = st.stanza("query", { xmlns = "jabber:iq:roster" }); 247 local query = st.stanza("query", { xmlns = "jabber:iq:roster" });
248 for jid in pairs(roster) do 248 for jid in pairs(roster) do
249 if jid ~= "pending" and jid then 249 if jid then
250 query:tag("item", { 250 query:tag("item", {
251 jid = jid, 251 jid = jid,
252 subscription = roster[jid].subscription, 252 subscription = roster[jid].subscription,
253 ask = roster[jid].ask, 253 ask = roster[jid].ask,
254 name = roster[jid].name, 254 name = roster[jid].name,
297 local roster = rm_load_roster(user, host); 297 local roster = rm_load_roster(user, host);
298 local rostersize = 0; 298 local rostersize = 0;
299 local IPs = ""; 299 local IPs = "";
300 local resources = ""; 300 local resources = "";
301 for jid in pairs(roster) do 301 for jid in pairs(roster) do
302 if jid ~= "pending" and jid then 302 if jid then
303 rostersize = rostersize + 1; 303 rostersize = rostersize + 1;
304 end 304 end
305 end 305 end
306 for resource, session in pairs((hosts[host].sessions[user] and hosts[host].sessions[user].sessions) or {}) do 306 for resource, session in pairs((hosts[host].sessions[user] and hosts[host].sessions[user].sessions) or {}) do
307 resources = resources .. "\n" .. resource; 307 resources = resources .. "\n" .. resource;