Comparison

plugins/mod_admin_adhoc.lua @ 8771:82bdeb8009ce

mod_admin_adhoc: Rename variable to avoid name clash [luacheck]
author Kim Alvefur <zash@zash.se>
date Tue, 01 May 2018 20:54:51 +0200
parent 8770:9c9b198bab84
child 8772:375f2e663cea
comparison
equal deleted inserted replaced
8770:9c9b198bab84 8771:82bdeb8009ce
249 return { status = "completed", error = { message = "User does not exist" } }; 249 return { status = "completed", error = { message = "User does not exist" } };
250 end 250 end
251 local roster = rm_load_roster(user, host); 251 local roster = rm_load_roster(user, host);
252 252
253 local query = st.stanza("query", { xmlns = "jabber:iq:roster" }); 253 local query = st.stanza("query", { xmlns = "jabber:iq:roster" });
254 for jid in pairs(roster) do 254 for contact_jid in pairs(roster) do
255 if jid then 255 if contact_jid then
256 query:tag("item", { 256 query:tag("item", {
257 jid = jid, 257 jid = contact_jid,
258 subscription = roster[jid].subscription, 258 subscription = roster[contact_jid].subscription,
259 ask = roster[jid].ask, 259 ask = roster[contact_jid].ask,
260 name = roster[jid].name, 260 name = roster[contact_jid].name,
261 }); 261 });
262 for group in pairs(roster[jid].groups) do 262 for group in pairs(roster[contact_jid].groups) do
263 query:tag("group"):text(group):up(); 263 query:tag("group"):text(group):up();
264 end 264 end
265 query:up(); 265 query:up();
266 end 266 end
267 end 267 end